Removed temperature overwriting. Added some disabled debug output messages. Reformatted code.

This commit is contained in:
Kai Lauterbach 2022-11-11 13:25:28 +01:00
parent baff93865c
commit a210c94721

View file

@ -376,10 +376,12 @@ void loop() {
//*************************************************************************//
#ifndef BATTERY_POWERED
void _fsm_loop() {
void _fsm_loop()
{
#ifdef WEBUPDATER_FEATURE
if ((update_webserver_cnt + (UPDATE_WEBSERVER_INTVERVAL_MS)) <= millis()) {
if ((update_webserver_cnt + (UPDATE_WEBSERVER_INTVERVAL_MS)) <= millis())
{
//debug("web updater call");
update_webserver_cnt = millis();
doWebUpdater();
@ -391,12 +393,15 @@ void _fsm_loop() {
{
// send the data to the server
debug("Sending weather json data to http webserver");
//debug(String(0) + "=" + String(currentSensorData[0]));
//debug(String(SENSOR_TEMPERATURE) + "=" + String(currentSensorData[SENSOR_TEMPERATURE]));
http_call_send_json_data_cnt = millis();
http_call_send_json_data();
}
#endif
switch (fsm_state) {
switch (fsm_state)
{
/* -------------------------------------------------------------------------------- */
case FSM_STATE_1:
@ -711,8 +716,6 @@ String getJsonData()
void http_call_send_json_data()
{
currentSensorData[sensor_cnt] = measure_wind_result();
//debug("http call to " + String(HTTP_CALL_SEND_JSON_DATA_URL));
// windspeed exceeded send http call