Compare commits

..

2 commits

Author SHA1 Message Date
Kai Lauterbach
ba1cc54d2e Cleaned include list in main firmware file. 2022-11-10 14:00:13 +01:00
Kai Lauterbach
a009a19261 Inverted status LED on behaviour 2022-11-10 13:49:50 +01:00

View file

@ -1,10 +1,6 @@
// Standard ESP8266 libs from project folder
#include <ESP8266mDNS.h>
#include <ESP8266HTTPUpdateServer.h>
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h> // WiFiClient
@ -17,6 +13,14 @@
#include <WiFiManager.h> // WiFiManager from bib manager
#endif
#ifdef HTTP_CALL_ON_WINDSPEED_EXCEED
#include <ESP8266HTTPClient.h>
#endif
#ifdef HTTP_CALL_SEND_JSON_DATA
#include <ESP8266HTTPClient.h>
#endif
//*************************************************************************//
// check if some settings are correct
@ -84,7 +88,7 @@ void setup()
pinMode(ANEMOMETER_PIN, INPUT_PULLUP);
pinMode(A0, INPUT);
digitalWrite(STATUS_LED_PIN, LOW);
digitalWrite(STATUS_LED_PIN, HIGH);
#ifndef BAT_PINS_D34
debug("D5 D6 used as battery pins");
@ -111,7 +115,7 @@ void setup()
_battery_mode_main();
digitalWrite(STATUS_LED_PIN, LOW);
digitalWrite(STATUS_LED_PIN, HIGH);
criticalBatCheck();
@ -607,7 +611,7 @@ void _fsm_loop()
if (currentSensorData[SENSOR_WINDSPEED] >= HTTP_CALL_ON_WINDSPEED_EXCEED_MPS)
{
// windspeed exceeded send http call
digitalWrite(STATUS_LED_PIN, HIGH);
digitalWrite(STATUS_LED_PIN, LOW);
// call the url HTTP_CALL_ON_WINDSPEED_URL
WiFiClient client;
@ -626,7 +630,7 @@ void _fsm_loop()
http.end();
debug("Called windspeed exceed callout");
digitalWrite(STATUS_LED_PIN, LOW);
digitalWrite(STATUS_LED_PIN, HIGH);
}
#ifdef WEBUPDATER_FEATURE