feature/http_call_send_json #3
1 changed files with 5 additions and 0 deletions
|
@ -334,6 +334,7 @@ void _loop()
|
||||||
// Disable expensive tasks
|
// Disable expensive tasks
|
||||||
sensors[SENSOR_WINDSPEED] = 0;
|
sensors[SENSOR_WINDSPEED] = 0;
|
||||||
//debug("read of wind sensor because of low battery disabled");
|
//debug("read of wind sensor because of low battery disabled");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sensors[SENSOR_WINDSPEED] = &wind_speed;
|
sensors[SENSOR_WINDSPEED] = &wind_speed;
|
||||||
//debug("read of wind sensor because of high battery enabled");
|
//debug("read of wind sensor because of high battery enabled");
|
||||||
|
@ -364,12 +365,16 @@ void _loop()
|
||||||
{
|
{
|
||||||
sensor_cnt++;
|
sensor_cnt++;
|
||||||
fsm_state = FSM_STATE_US; // jump to same state again, more sensors to read
|
fsm_state = FSM_STATE_US; // jump to same state again, more sensors to read
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
update_sensor_cnt = millis();
|
update_sensor_cnt = millis();
|
||||||
sensor_cnt = 0;
|
sensor_cnt = 0;
|
||||||
fsm_state = FSM_STATE_SC; // next state
|
fsm_state = FSM_STATE_SC; // next state
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
debug("skip read sensor data");
|
debug("skip read sensor data");
|
||||||
fsm_state = FSM_STATE_WU; // no new data, reset FSM
|
fsm_state = FSM_STATE_WU; // no new data, reset FSM
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue