feature/http_call_send_json #3
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:
|
||||
|
@ -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