Merge branch 'master' into development
This commit is contained in:
4 files changed
+21
-9
No files matched your search
+2
-1
@@ -12,7 +12,8 @@ void i2c_init(void) {
|
||||
Wire.begin();
|
||||
}
|
||||
|
||||
void i2c_deinit(void) { Wire.end(); }
|
||||
//void i2c_deinit(void) { Wire.end(); }
|
||||
void i2c_deinit(void) { Wire.~TwoWire(); }
|
||||
|
||||
void i2c_scan(void) {
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
//
|
||||
// --> adapt to your needs and use case <--
|
||||
//
|
||||
// Note: After editing, before "build", use "clean" button in PlatformIO!
|
||||
// Notes:
|
||||
// 1. After editing, before "build", use "clean" button in PlatformIO!
|
||||
// 2. Clear NVRAM of the board to delete previous stored runtime settings (pio run -t erase)
|
||||
|
||||
// Device options
|
||||
#define VERBOSE 1 // set to 0 to silence the device, 1 enables additional debug output
|
||||
|
||||
+10
-5
@@ -33,9 +33,6 @@ void setTimeSyncIRQ() { xTaskNotify(irqHandlerTask, TIMESYNC_IRQ, eSetBits); }
|
||||
|
||||
void calibrateTime(void) {
|
||||
|
||||
time_t t = 0;
|
||||
uint16_t t_msec = 0;
|
||||
|
||||
// kick off asynchronous lora timesync if we have
|
||||
#if (HAS_LORA_TIME)
|
||||
timesync_request();
|
||||
@@ -43,6 +40,10 @@ void calibrateTime(void) {
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if ((HAS_GPS) || (HAS_RTC))
|
||||
time_t t = 0;
|
||||
uint16_t t_msec = 0;
|
||||
|
||||
// get GPS time, if we have
|
||||
#if (HAS_GPS)
|
||||
t = get_gpstime(&t_msec);
|
||||
@@ -57,6 +58,8 @@ void calibrateTime(void) {
|
||||
return;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
} // calibrateTime()
|
||||
|
||||
// set system time (UTC), calibrate RTC and RTC_INT pps
|
||||
@@ -250,14 +253,16 @@ void clock_init(void) {
|
||||
|
||||
void clock_loop(void *taskparameter) { // ClockTask
|
||||
|
||||
uint64_t ClockPulse = 0;
|
||||
uint32_t current_time = 0, previous_time = 0;
|
||||
int8_t ClockMinute = -1;
|
||||
time_t tt;
|
||||
struct tm t = {0};
|
||||
#ifdef HAS_TWO_LED
|
||||
static bool led1_state = false;
|
||||
#endif
|
||||
#ifdef HAS_DCF77
|
||||
uint64_t ClockPulse = 0;
|
||||
int8_t ClockMinute = -1;
|
||||
#endif
|
||||
|
||||
// output the next second's pulse/telegram after pps arrived
|
||||
for (;;) {
|
||||
|
||||
Reference in new issue
Block a user