diff --git a/firmware/webUpdater.ino b/firmware/webUpdater.ino index f8e3a7d..a8443a3 100644 --- a/firmware/webUpdater.ino +++ b/firmware/webUpdater.ino @@ -45,6 +45,9 @@ void setupWebUpdater(String device, String ip) #ifdef HOMEBRIDGE_WEBSTAT httpServer.on("/hbWebstat", hb_webstat_send); #endif +#ifdef DEBUG_WINDSPEED_MEASUREMENT + httpServer.on("/measWind", measureWindspeed); +#endif httpServer.begin(); @@ -134,3 +137,21 @@ void resetWifiManager() // manual reset after restart is required ESP.restart(); } + +void measureWindspeed() +{ + + // read from windspeed sensorSTATUS_LED_PIN + digitalWrite(STATUS_LED_PIN, HIGH); + debug("Starting windspeed measurement"); + float tmp_windspeed = wind_speed(); + digitalWrite(STATUS_LED_PIN, LOW); + + String message = "