Update drift compensation in ino version

This commit is contained in:
Oskar Winkels 2021-04-21 15:34:24 +02:00
parent 72a37df703
commit 5072d09682
Signed by: o.winkels
GPG Key ID: E7484A06E99DAEF1
1 changed files with 4 additions and 4 deletions

View File

@ -137,10 +137,10 @@ void clockUpdate() {
ts += UPDATE_INTERVAL_S; ts += UPDATE_INTERVAL_S;
/* drift determined experimentally: /* drift determined experimentally:
* ~3.5 ms "calculation time" per cycle * ~3.5ms/cycle "calculation time"
* ~12.6ms/s aka 63.6ms/cycle other drift (wakeup time?) * 60ms/cycle other drift (wakeup time?)
*/ */
#define DRIFT_MS 65 #define DRIFT_MS 63
#define SCHEDULE_DELAY_MS ((1000 * UPDATE_INTERVAL_S) - DRIFT_MS) #define SCHEDULE_DELAY_MS ((1000 * UPDATE_INTERVAL_S) - DRIFT_MS)
scheduler.scheduleDelayed(clockUpdate, SCHEDULE_DELAY_MS); scheduler.scheduleDelayed(clockUpdate, SCHEDULE_DELAY_MS);
@ -173,7 +173,7 @@ void loop() {
break; break;
} }
*/ */
ts = 1618048100L; ts = 1618651100L;
scheduler.execute(); scheduler.execute();