Removed temperature overwriting. Added some disabled debug output messages. Reformatted code.
This commit is contained in:
parent
baff93865c
commit
a210c94721
1 changed files with 9 additions and 6 deletions
|
@ -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:
|
||||
|
@ -688,7 +693,7 @@ String getJsonData()
|
|||
String(currentSensorData[SENSOR_TEMPERATURE], 2) +
|
||||
", " +
|
||||
hb_ws_msg_humi +
|
||||
String( (isnan(currentSensorData[SENSOR_HUMIDITY]) ? 0.0 : currentSensorData[SENSOR_HUMIDITY]), 2) +
|
||||
String((isnan(currentSensorData[SENSOR_HUMIDITY]) ? 0.0 : currentSensorData[SENSOR_HUMIDITY]), 2) +
|
||||
", " +
|
||||
hb_ws_msg_light +
|
||||
String(currentSensorData[SENSOR_LIGHT], 0) + // The light level for the homebridge-http-lux2 plugin is only able to parse integer values
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue