Update drift compensation in ino version
This commit is contained in:
parent
72a37df703
commit
5072d09682
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue