smaller rtc fixes
This commit is contained in:
@@ -114,7 +114,7 @@ void receiver_loop() {
|
||||
}
|
||||
|
||||
if (time_to_send_timesync()) {
|
||||
time_send_timesync(self_short_id); // 60s for first 10 min, then hourly
|
||||
time_send_timesync(self_short_id); // 60s for first 10 min, then hourly if RTC is present
|
||||
}
|
||||
|
||||
mqtt_loop();
|
||||
@@ -242,8 +242,10 @@ inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = { 0xF19C };
|
||||
- Defaults: `pool.ntp.org` and `time.nist.gov`.
|
||||
## RTC (DS3231)
|
||||
- Optional DS3231 on the I2C bus. Connect SDA to GPIO21 and SCL to GPIO22 (same bus as the OLED).
|
||||
- Enable/disable with `ENABLE_DS3231` in `include/config.h`.
|
||||
- Receiver time sync packets set the RTC.
|
||||
- On boot, if no LoRa time sync has arrived yet, the sender uses the RTC time as the initial `ts_utc`.
|
||||
- When no RTC is present or enabled, the receiver keeps sending time sync every 60 seconds.
|
||||
|
||||
## Build Environments
|
||||
- `lilygo-t3-v1-6-1`: production build
|
||||
|
||||
Reference in New Issue
Block a user