first commit
This commit is contained in:
parent
634f2e4f1f
commit
053476718e
@ -75,8 +75,17 @@ static void hal_sleep_until(timestamp_t ts) {
|
||||
if (remaining <= 0) {
|
||||
break;
|
||||
}
|
||||
delayMicroseconds(remaining+5000); // Delay for remaining microseconds
|
||||
Serial.println(remaining);
|
||||
|
||||
// Adjust the delay duration based on the remaining time
|
||||
if (remaining >= 1000) {
|
||||
delayMicroseconds(1000); // Delay for 1000 microseconds (1 millisecond)
|
||||
} else if (remaining > 100) {
|
||||
delayMicroseconds(100); // Delay for 100 microseconds
|
||||
} else if (remaining > 10) {
|
||||
delayMicroseconds(10); // Delay for 10 microseconds
|
||||
} else if (remaining > 0) {
|
||||
delayMicroseconds(1); // Delay for 1 microsecond
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -339,7 +348,7 @@ void setup() {
|
||||
|
||||
tamalib_register_hal(&hal);
|
||||
tamalib_set_framerate(TAMA_DISPLAY_FRAMERATE);
|
||||
tamalib_init(1000000);
|
||||
tamalib_init(1010000);
|
||||
|
||||
#if defined(ENABLE_SAVE_STATUS) || defined(AUTO_SAVE_MINUTES) || defined(ENABLE_LOAD_STATE_FROM_EEPROM)
|
||||
initEEPROM();
|
||||
|
Loading…
Reference in New Issue
Block a user