feature/http_call_send_json #3

Merged
f merged 56 commits from feature/http_call_send_json into master 2022-11-27 11:02:22 +01:00
2 changed files with 4 additions and 13 deletions
Showing only changes of commit 7770f83ef7 - Show all commits

View file

@ -32,15 +32,6 @@ float currentSensorData[VALUES] = { nanf("no value"), nanf("no value"), nanf("no
nanf("no value"), nanf("no value") }; nanf("no value"), nanf("no value") };
float (*sensors[VALUES])() = {}; float (*sensors[VALUES])() = {};
uint8_t sensor_ids[] = { SENSOR_TEMPERATURE,
SENSOR_HUMIDITY,
SENSOR_LIGHT,
SENSOR_WINDSPEED,
SENSOR_PRESSURE,
SENSOR_BAT_VOLTAGE,
SENSOR_ESAVEMODE,
SENSOR_BATCHARGESTATE };
uint32_t update_sensor_cnt = 0; uint32_t update_sensor_cnt = 0;
uint32_t update_webserver_cnt = 0; uint32_t update_webserver_cnt = 0;
uint32_t update_windspeed_exceed_cnt = 0; uint32_t update_windspeed_exceed_cnt = 0;
@ -351,13 +342,13 @@ void _loop()
debug("read sensor data " + String(sensor_cnt)); debug("read sensor data " + String(sensor_cnt));
if (sensors[sensor_cnt]) if (sensors[sensor_cnt])
{ {
debug("sensors[sensor_ids[" + String(sensor_cnt) + " ]]=" + String((int)sensors[sensor_cnt]) + ":" + String((int)sensors[sensor_ids[sensor_cnt]]) + ":" + String(sensor_ids[sensor_cnt])); debug("sensors[sensor_ids[" + String(sensor_cnt) + "]]=" + String((int)sensors[sensor_cnt]));
//currentSensorData[sensor_cnt] = sensors[sensor_ids[sensor_cnt]](); //currentSensorData[sensor_cnt] = sensors[sensor_cnt]();
currentSensorData[sensor_cnt] = sensor_cnt; currentSensorData[sensor_cnt] = sensor_cnt;
} else { } else {
debug("sensors[sensor_ids[" + String(sensor_cnt) + "]]=nan"); debug("sensors[" + String(sensor_cnt) + "]=nan");
currentSensorData[sensor_cnt] = nan("no value"); currentSensorData[sensor_cnt] = nan("no value");
} }

View file

@ -210,7 +210,7 @@ void measureWindspeed()
#ifdef USE_LOGGER #ifdef USE_LOGGER
#define LOGFILE_SIZE 20 #define LOGFILE_SIZE 25
String logfile[LOGFILE_SIZE]; String logfile[LOGFILE_SIZE];