Some checks failed
Build and deploy Docs site to GitHub Pages / github-pages (push) Has been cancelled
PR Build Check / build (Heltec_v3_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (Heltec_v3_repeater) (push) Has been cancelled
PR Build Check / build (Heltec_v3_room_server) (push) Has been cancelled
PR Build Check / build (LilyGo_Tlora_C6_repeater_) (push) Has been cancelled
PR Build Check / build (PicoW_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (RAK_4631_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_room_server) (push) Has been cancelled
PR Build Check / build (wio-e5-mini_repeater) (push) Has been cancelled
- MeshCore-based Simple Sensor firmware - Heltec T114 without display - BME280 sensor support (temp/humidity/pressure) - Radio: 868.856018 MHz, SF7, BW62.5 kHz, CR4/7 - 2-byte path hash - PlatformIO project
22 lines
516 B
C++
22 lines
516 B
C++
#pragma once
|
|
|
|
#include <Mesh.h>
|
|
#include <Arduino.h>
|
|
#include <Wire.h>
|
|
|
|
class AutoDiscoverRTCClock : public mesh::RTCClock {
|
|
mesh::RTCClock* _fallback;
|
|
|
|
bool i2c_probe(TwoWire& wire, uint8_t addr);
|
|
public:
|
|
AutoDiscoverRTCClock(mesh::RTCClock& fallback) : _fallback(&fallback) { }
|
|
|
|
void begin(TwoWire& wire);
|
|
uint32_t getCurrentTime() override;
|
|
void setCurrentTime(uint32_t time) override;
|
|
|
|
void tick() override {
|
|
_fallback->tick(); // is typically VolatileRTCClock, which now needs tick()
|
|
}
|
|
};
|