Prevent deep sleep during BMP280 communication

This commit is contained in:
Thomas Kolb 2022-10-15 21:48:15 +02:00
parent 5c6497fb82
commit 1cbe0ce410

View file

@ -369,6 +369,7 @@ int main(void)
charge_control_update(timebase_ms, &meas_data);
// deep sleep control
if(bmp280_state != BMP280_MEASURING) { // general blockers
if(charge_control_is_idle()) {
if(!charge_control_was_idle) {
charge_control_was_idle = true;
@ -384,6 +385,7 @@ int main(void)
charge_control_was_idle = false;
}
}
}
timebase_ms++;