IF482 minor fixes
This commit is contained in:
parent
ddc7abe90d
commit
e6aba4fe63
@ -130,7 +130,7 @@ void if482_loop(void *pvParameters) {
|
||||
tt = now();
|
||||
} while (t == tt);
|
||||
|
||||
const TickType_t startTime = xTaskGetTickCount();
|
||||
const TickType_t startOffset = xTaskGetTickCount();
|
||||
|
||||
// task remains in blocked state until it is notified by isr
|
||||
for (;;) {
|
||||
@ -141,7 +141,7 @@ void if482_loop(void *pvParameters) {
|
||||
portMAX_DELAY); // wait forever (missing error handling here...)
|
||||
|
||||
t = now();
|
||||
wakeTime -= startTime;
|
||||
wakeTime -= startOffset;
|
||||
|
||||
// now we're synced to start of second t and wait
|
||||
// until it's time to start transmit telegram for t+1
|
||||
|
@ -414,6 +414,7 @@ void setup() {
|
||||
// start RTC interrupt
|
||||
#if defined HAS_IF482 && defined HAS_RTC
|
||||
// setup external interupt for active low RTC INT pin
|
||||
if (IF482IRQ != NULL) // has if482loop task started?
|
||||
attachInterrupt(digitalPinToInterrupt(RTC_INT), IF482IRQ, FALLING);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user