Prevent deep sleep during BMP280 communication
This commit is contained in:
parent
5c6497fb82
commit
1cbe0ce410
|
@ -369,6 +369,7 @@ int main(void)
|
||||||
charge_control_update(timebase_ms, &meas_data);
|
charge_control_update(timebase_ms, &meas_data);
|
||||||
|
|
||||||
// deep sleep control
|
// deep sleep control
|
||||||
|
if(bmp280_state != BMP280_MEASURING) { // general blockers
|
||||||
if(charge_control_is_idle()) {
|
if(charge_control_is_idle()) {
|
||||||
if(!charge_control_was_idle) {
|
if(!charge_control_was_idle) {
|
||||||
charge_control_was_idle = true;
|
charge_control_was_idle = true;
|
||||||
|
@ -384,6 +385,7 @@ int main(void)
|
||||||
charge_control_was_idle = false;
|
charge_control_was_idle = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
timebase_ms++;
|
timebase_ms++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue