From 58bc1f1d8a17eeffa1136acafe6a51ea50c589b1 Mon Sep 17 00:00:00 2001 From: lumapu Date: Wed, 9 Nov 2022 22:13:31 +0100 Subject: [PATCH] refactored directory structure revert PR #401 (no class, pasted to app.cpp) --- tools/esp8266/CHANGES.md | 7 - tools/esp8266/main.cpp | 6 +- tools/esp8266/platformio.ini | 65 +---- tools/esp8266/{ => src}/app.cpp | 269 +----------------- tools/esp8266/{ => src}/app.h | 18 +- tools/esp8266/{ => src/config}/config.h | 0 .../config}/config_override_example.h | 0 tools/esp8266/{ => src/config}/eep.h | 0 tools/esp8266/{ => src}/defines.h | 2 +- tools/esp8266/{ => src/hm}/CircularBuffer.h | 0 tools/esp8266/{ => src/hm}/hmDefines.h | 2 +- tools/esp8266/{ => src/hm}/hmInverter.h | 0 tools/esp8266/{ => src/hm}/hmRadio.h | 4 +- tools/esp8266/{ => src/hm}/hmSystem.h | 0 tools/esp8266/{ => src/utils}/crc.cpp | 0 tools/esp8266/{ => src/utils}/crc.h | 0 tools/esp8266/{ => src/utils}/dbg.cpp | 0 tools/esp8266/{include => src/utils}/dbg.h | 0 tools/esp8266/{ => src/web}/mqtt.h | 2 +- tools/esp8266/{ => src/web}/web.cpp | 20 +- tools/esp8266/{ => src/web}/web.h | 4 +- tools/esp8266/{ => src/web}/webApi.cpp | 0 tools/esp8266/{ => src/web}/webApi.h | 4 +- tools/esp8266/{ => src/wifi}/ahoywifi.cpp | 0 tools/esp8266/{ => src/wifi}/ahoywifi.h | 6 +- 25 files changed, 40 insertions(+), 369 deletions(-) delete mode 100644 tools/esp8266/CHANGES.md rename tools/esp8266/{ => src}/app.cpp (85%) rename tools/esp8266/{ => src}/app.h (97%) rename tools/esp8266/{ => src/config}/config.h (100%) rename tools/esp8266/{ => src/config}/config_override_example.h (100%) rename tools/esp8266/{ => src/config}/eep.h (100%) rename tools/esp8266/{ => src}/defines.h (99%) rename tools/esp8266/{ => src/hm}/CircularBuffer.h (100%) rename tools/esp8266/{ => src/hm}/hmDefines.h (99%) rename tools/esp8266/{ => src/hm}/hmInverter.h (100%) rename tools/esp8266/{ => src/hm}/hmRadio.h (99%) rename tools/esp8266/{ => src/hm}/hmSystem.h (100%) rename tools/esp8266/{ => src/utils}/crc.cpp (100%) rename tools/esp8266/{ => src/utils}/crc.h (100%) rename tools/esp8266/{ => src/utils}/dbg.cpp (100%) rename tools/esp8266/{include => src/utils}/dbg.h (100%) rename tools/esp8266/{ => src/web}/mqtt.h (99%) rename tools/esp8266/{ => src/web}/web.cpp (98%) rename tools/esp8266/{ => src/web}/web.h (98%) rename tools/esp8266/{ => src/web}/webApi.cpp (100%) rename tools/esp8266/{ => src/web}/webApi.h (98%) rename tools/esp8266/{ => src/wifi}/ahoywifi.cpp (100%) rename tools/esp8266/{ => src/wifi}/ahoywifi.h (94%) diff --git a/tools/esp8266/CHANGES.md b/tools/esp8266/CHANGES.md deleted file mode 100644 index 85cd7aea..00000000 --- a/tools/esp8266/CHANGES.md +++ /dev/null @@ -1,7 +0,0 @@ -# Changelog - -- v0.5.17 - * Bug fix for 1 channel inverters (HM300, HM400) see #246 - * Bug fix for read back the active power limit from inverter #243 (before version 0.5.16 the reported limit was just a copy of the user set point, now it is the actual value which the inverter uses) - * Update the [user manual](https://github.com/grindylow/ahoy/blob/main/tools/esp8266/User_Manual.md); added section aobut the published data on mqtt; section about zero export control; added section about code implementation command queue - * Added tx-Id number to packet payload struct. (eg. can be 0x95 or 0xD1) --> less messages fails and faster handling of changing power limit diff --git a/tools/esp8266/main.cpp b/tools/esp8266/main.cpp index eb7a388b..366d2f1c 100644 --- a/tools/esp8266/main.cpp +++ b/tools/esp8266/main.cpp @@ -3,9 +3,9 @@ // Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/ //----------------------------------------------------------------------------- -#include "dbg.h" -#include "app.h" -#include "config.h" +#include "src/utils/dbg.h" +#include "src/app.h" +#include "src/config/config.h" app myApp; diff --git a/tools/esp8266/platformio.ini b/tools/esp8266/platformio.ini index 393a1302..7a5946d6 100644 --- a/tools/esp8266/platformio.ini +++ b/tools/esp8266/platformio.ini @@ -37,13 +37,11 @@ lib_deps = paulstoffregen/Time knolleary/PubSubClient bblanchon/ArduinoJson - ;esp8266/DNSServer@1.1.0 - ;esp8266/EEPROM@^1.0 - ;esp8266/ESP8266HTTPUpdateServer@^1.0 - ;esp8266/ESP8266WebServer@^1.0 - ;esp8266/ESP8266WiFi@^1.0 - ;esp8266/SPI@1.0 - ;esp8266/Ticker@^1.0 + ;esp8266/DNSServer + ;esp8266/EEPROM + ;esp8266/ESP8266WiFi + ;esp8266/SPI + ;esp8266/Ticker [env:esp8266-release] platform = espressif8266 @@ -89,41 +87,6 @@ monitor_filters = time ; Add timestamp with milliseconds for each new line log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory -[env:esp8266-nokia5110] -platform = espressif8266 -board = esp12e -board_build.f_cpu = 80000000L -build_flags = -D RELEASE -DU8X8_NO_HW_I2C -DENA_NOKIA -monitor_filters = - ;default ; Remove typical terminal control codes from input - time ; Add timestamp with milliseconds for each new line - ;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory -lib_deps = - https://github.com/yubox-node-org/ESPAsyncWebServer - nrf24/RF24 - paulstoffregen/Time - knolleary/PubSubClient - bblanchon/ArduinoJson - olikraus/U8g2 - -[env:esp8266-ssd1306] -platform = espressif8266 -board = esp12e -board_build.f_cpu = 80000000L -build_flags = -D RELEASE -DENA_SSD1306 -monitor_filters = - ;default ; Remove typical terminal control codes from input - time ; Add timestamp with milliseconds for each new line - ;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory -lib_deps = - https://github.com/yubox-node-org/ESPAsyncWebServer - nrf24/RF24 - paulstoffregen/Time - knolleary/PubSubClient - bblanchon/ArduinoJson - ;https://github.com/pasko-zh/brzo_i2c.git - https://github.com/ThingPulse/esp8266-oled-ssd1306.git - [env:esp32-wroom32-release] platform = espressif32 board = lolin_d32 @@ -144,21 +107,3 @@ monitor_filters = ;default ; Remove typical terminal control codes from input time ; Add timestamp with milliseconds for each new line log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory - -[env:esp32-wroom32-ssd1306] -platform = espressif32 -board = lolin_d32 -build_flags = -D RELEASE -std=gnu++14 -DENA_SSD1306 -build_unflags = -std=gnu++11 -monitor_filters = - ;default ; Remove typical terminal control codes from input - time ; Add timestamp with milliseconds for each new line - ;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory - -lib_deps = - https://github.com/yubox-node-org/ESPAsyncWebServer - nrf24/RF24 - paulstoffregen/Time - knolleary/PubSubClient - bblanchon/ArduinoJson - https://github.com/ThingPulse/esp8266-oled-ssd1306.git \ No newline at end of file diff --git a/tools/esp8266/app.cpp b/tools/esp8266/src/app.cpp similarity index 85% rename from tools/esp8266/app.cpp rename to tools/esp8266/src/app.cpp index 50443988..c32ad918 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/src/app.cpp @@ -11,14 +11,6 @@ #include "app.h" #include -#ifdef ENA_NOKIA -#include -#endif -#ifdef ENA_SSD1306 -#include -#include -#endif - //----------------------------------------------------------------------------- app::app() { @@ -35,261 +27,10 @@ app::app() { mShouldReboot = false; } -#ifdef ENA_SSD1306 -/* esp8266 : SCL = 5, SDA = 4 */ -/* ewsp32 : SCL = 22, SDA = 21 */ -SSD1306Wire display(0x3c, SDA, SCL); - -static unsigned char bmp_arrow[] PROGMEM = { - B00000000, B00011100, B00011100, B00001110, B00001110, B11111110, B01111111, - B01110000, B01110000, B00110000, B00111000, B00011000, B01111111, B00111111, - B00011110, B00001110, B00000110, B00000000, B00000000, B00000000, B00000000 } ; - -void DataScreen( app* mApp, time_t ts ) -{ -static int extra = 0; - String timeStr = mApp->getDateTimeStr(ts).substring(2,22); - IPAddress ip = WiFi.localIP(); - float totalYield = 0.000, totalYieldToday = 0.000, totalActual = 0.0; - char fmtText[32]; - int ucnt=0; - - for (uint8_t id = 0; id < mApp->mSys->getNumInverters(); id++) - { - Inverter<> *iv = mApp->mSys->getInverterByPos(id); - if (NULL != iv) - { - record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug); - uint8_t pos; - uint8_t list[] = {FLD_PAC, FLD_YT, FLD_YD}; - - if ( !iv->isProducing(ts,rec) ) - continue; - - ucnt++; - - for (uint8_t fld = 0; fld < 3; fld++) - { - pos = iv->getPosByChFld(CH0, list[fld],rec); - - if(fld == 1){ - totalYield += iv->getValue(pos,rec); - } - - if(fld == 2){ - totalYieldToday += iv->getValue(pos,rec); - } - - if(fld == 0){ - totalActual += iv->getValue(pos,rec); - } - } - } - } - - display.clear(); - - if(ucnt) - { - display.setBrightness(63); - display.drawXbm(10,5,8,17,bmp_arrow); - display.setFont(ArialMT_Plain_24); - sprintf(fmtText,"%3.0f",totalActual); - display.drawString(25,0,String(fmtText)+F(" W")); - display.setFont(ArialMT_Plain_16); - sprintf(fmtText,"%4.0f",totalYieldToday); - display.drawString(5,22,F("today ")+String(fmtText)+F(" Wh")); - sprintf(fmtText,"%.1f",totalYield); - display.drawString(5,35,F("total ")+String(fmtText)+F(" kWh")); - display.drawLine(2,23,123,23); - } - else - { -static int rx=50; -static char up=1; - if(up) - { - rx+=2; - if(rx>=70) - up=0; - } - else - { - rx-=2; - if(rx<=50) - up=1; - } - display.setBrightness(1); - display.setFont(ArialMT_Plain_24); - display.drawString(rx,10,F("off")); - display.setFont(ArialMT_Plain_16); - } - if ( !(extra%20) ) - { - display.drawString(5,49,ip.toString()); - } - else - { - int w=display.getStringWidth(timeStr.c_str(),timeStr.length(),0); - if ( w>127 ) - { - String tt=timeStr.substring(9,17); - w=display.getStringWidth(tt.c_str(),tt.length(),0); - display.drawString(127-w,49,tt); - } - else - display.drawString(0,49,timeStr); - } - - display.display(); - extra++; -} -#endif - -#ifdef ENA_NOKIA - -U8G2_PCD8544_84X48_1_4W_HW_SPI u8g2(U8G2_R0,5,4,16); - -void ShowInfoText( const char *txt ) -{ - /* u8g2_font_open_iconic_embedded_2x_t 'D' + 'G' + 'J' */ - u8g2.clear(); - u8g2.firstPage(); - do{ - const char *e; - const char *p = txt; - int y=10; - u8g2.setFont(u8g2_font_5x8_tr); - while(1) - { - for(e=p+1; (*e && (*e != '\n')); e++); - size_t len=e-p; - u8g2.setCursor(2,y); - String res=((String)p).substring(0,len); - u8g2.print(res); - if ( !*e ) - break; - p=e+1; - y+=12; - } - u8g2.sendBuffer(); - } while( u8g2.nextPage() ); -} - -static unsigned char bmp_arrow[] U8X8_PROGMEM = { - B00000000, B00011100, B00011100, B00001110, B00001110, B11111110, B01111111, - B01110000, B01110000, B00110000, B00111000, B00011000, B01111111, B00111111, - B00011110, B00001110, B00000110, B00000000, B00000000, B00000000, B00000000 } ; - -void DataScreen( app* mApp, time_t ts ) -{ -static int extra = 0; - String timeStr = mApp->getDateTimeStr(ts).substring(2,22); - IPAddress ip = WiFi.localIP(); - float totalYield = 0.000, totalYieldToday = 0.000, totalActual = 0.0; - char fmtText[32]; - int ucnt=0; - - for (uint8_t id = 0; id < mApp->mSys->getNumInverters(); id++) - { - Inverter<> *iv = mApp->mSys->getInverterByPos(id); - if (NULL != iv) - { - record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug); - uint8_t pos; - uint8_t list[] = {FLD_PAC, FLD_YT, FLD_YD}; - - if ( !iv->isProducing(ts,rec) ) - continue; - - ucnt++; - - for (uint8_t fld = 0; fld < 3; fld++) - { - pos = iv->getPosByChFld(CH0, list[fld],rec); - - if(fld == 1){ - totalYield += iv->getValue(pos,rec); - } - - if(fld == 2){ - totalYieldToday += iv->getValue(pos,rec); - } - - if(fld == 0){ - totalActual += iv->getValue(pos,rec); - } - } - } - } - - /* u8g2_font_open_iconic_embedded_2x_t 'D' + 'G' + 'J' */ - u8g2.clear(); - u8g2.firstPage(); - do{ - if(ucnt) - { - u8g2.drawXBMP(10,0,8,17,bmp_arrow); - u8g2.setFont(u8g2_font_logisoso16_tr); - u8g2.setCursor(25,16); - sprintf(fmtText,"%3.0f",totalActual); - u8g2.print(String(fmtText)+F(" W")); - u8g2.drawHLine(2,20,78); - u8g2.setFont(u8g2_font_5x8_tr); - u8g2.setCursor(5,29); - sprintf(fmtText,"%4.0f",totalYieldToday); - u8g2.print(F("today ")+String(fmtText)+F(" Wh")); - u8g2.setCursor(5,37); - sprintf(fmtText,"%.1f",totalYield); - u8g2.print(F("total ")+String(fmtText)+F(" kWh")); - } - else - { - u8g2.setFont(u8g2_font_logisoso16_tr); - u8g2.setCursor(30,30); - u8g2.print(F("off")); - u8g2.setFont(u8g2_font_5x8_tr); - } - if ( !(extra%20) ) - { - u8g2.setCursor(5,57); - u8g2.print(ip); - } - else - { - u8g2.setCursor(0,47); - u8g2.print(timeStr); - } - - u8g2.sendBuffer(); - } while( u8g2.nextPage() ); - extra++; -} -#endif - //----------------------------------------------------------------------------- void app::setup(uint32_t timeout) { DPRINTLN(DBG_VERBOSE, F("app::setup")); -#ifdef ENA_NOKIA - u8g2.begin(); - ShowInfoText("booting..."); -#endif -#ifdef ENA_SSD1306 - display.init(); - display.flipScreenVertically(); - display.setContrast(63); - display.setBrightness(63); - - display.clear(); - display.setFont(ArialMT_Plain_24); - display.setTextAlignment(TEXT_ALIGN_CENTER_BOTH); - - display.drawString(64,22,"Starting..."); - display.display(); - display.setTextAlignment(TEXT_ALIGN_LEFT); -#endif - mWifiSettingsValid = checkEEpCrc(ADDR_START, ADDR_WIFI_CRC, ADDR_WIFI_CRC); mSettingsValid = checkEEpCrc(ADDR_START_SETTINGS, ((ADDR_NEXT) - (ADDR_START_SETTINGS)), ADDR_SETTINGS_CRC); loadEEpconfig(); @@ -341,15 +82,7 @@ void app::loop(void) { mUtcTimestamp = mWifi->getNtpTime(); DPRINTLN(DBG_INFO, F("[NTP]: ") + getDateTimeStr(mUtcTimestamp) + F(" UTC")); } -#if defined(ENA_NOKIA) || defined(ENA_SSD1306) -static int lcnt=90000; - if ( lcnt == 150000 ) - { - DataScreen(this, mUtcTimestamp); - lcnt=0; - } - lcnt++; -#endif + if (mFlagSendDiscoveryConfig) { mFlagSendDiscoveryConfig = false; sendMqttDiscoveryConfig(); diff --git a/tools/esp8266/app.h b/tools/esp8266/src/app.h similarity index 97% rename from tools/esp8266/app.h rename to tools/esp8266/src/app.h index e226b48a..7dadc298 100644 --- a/tools/esp8266/app.h +++ b/tools/esp8266/src/app.h @@ -6,7 +6,7 @@ #ifndef __APP_H__ #define __APP_H__ -#include "dbg.h" +#include "src/utils/dbg.h" #include "Arduino.h" @@ -15,15 +15,15 @@ #include #include -#include "eep.h" +#include "config/eep.h" #include "defines.h" -#include "crc.h" +#include "utils/crc.h" -#include "CircularBuffer.h" -#include "hmSystem.h" -#include "mqtt.h" -#include "ahoywifi.h" -#include "web.h" +#include "hm/CircularBuffer.h" +#include "hm/hmSystem.h" +#include "wifi/ahoywifi.h" +#include "web/mqtt.h" +#include "web/web.h" // convert degrees and radians for sun calculation #define SIN(x) (sin(radians(x))) @@ -179,7 +179,7 @@ class app { void setupMqtt(void); void sendMqttDiscoveryConfig(void); void sendMqtt(void); - + void setupLed(void); void updateLed(void); diff --git a/tools/esp8266/config.h b/tools/esp8266/src/config/config.h similarity index 100% rename from tools/esp8266/config.h rename to tools/esp8266/src/config/config.h diff --git a/tools/esp8266/config_override_example.h b/tools/esp8266/src/config/config_override_example.h similarity index 100% rename from tools/esp8266/config_override_example.h rename to tools/esp8266/src/config/config_override_example.h diff --git a/tools/esp8266/eep.h b/tools/esp8266/src/config/eep.h similarity index 100% rename from tools/esp8266/eep.h rename to tools/esp8266/src/config/eep.h diff --git a/tools/esp8266/defines.h b/tools/esp8266/src/defines.h similarity index 99% rename from tools/esp8266/defines.h rename to tools/esp8266/src/defines.h index 1223e45c..5ae2f8bb 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/src/defines.h @@ -6,7 +6,7 @@ #ifndef __DEFINES_H__ #define __DEFINES_H__ -#include "config.h" +#include "config/config.h" //------------------------------------- // VERSION diff --git a/tools/esp8266/CircularBuffer.h b/tools/esp8266/src/hm/CircularBuffer.h similarity index 100% rename from tools/esp8266/CircularBuffer.h rename to tools/esp8266/src/hm/CircularBuffer.h diff --git a/tools/esp8266/hmDefines.h b/tools/esp8266/src/hm/hmDefines.h similarity index 99% rename from tools/esp8266/hmDefines.h rename to tools/esp8266/src/hm/hmDefines.h index b89dd9a4..6cf6f4b7 100644 --- a/tools/esp8266/hmDefines.h +++ b/tools/esp8266/src/hm/hmDefines.h @@ -6,7 +6,7 @@ #ifndef __HM_DEFINES_H__ #define __HM_DEFINES_H__ -#include "dbg.h" +#include "../utils/dbg.h" #include diff --git a/tools/esp8266/hmInverter.h b/tools/esp8266/src/hm/hmInverter.h similarity index 100% rename from tools/esp8266/hmInverter.h rename to tools/esp8266/src/hm/hmInverter.h diff --git a/tools/esp8266/hmRadio.h b/tools/esp8266/src/hm/hmRadio.h similarity index 99% rename from tools/esp8266/hmRadio.h rename to tools/esp8266/src/hm/hmRadio.h index 572e59b1..4e1b749c 100644 --- a/tools/esp8266/hmRadio.h +++ b/tools/esp8266/src/hm/hmRadio.h @@ -6,9 +6,9 @@ #ifndef __RADIO_H__ #define __RADIO_H__ -#include "dbg.h" +#include "../utils/dbg.h" #include -#include "crc.h" +#include "../utils/crc.h" #ifndef DISABLE_IRQ #if defined(ESP8266) || defined(ESP32) #define DISABLE_IRQ noInterrupts() diff --git a/tools/esp8266/hmSystem.h b/tools/esp8266/src/hm/hmSystem.h similarity index 100% rename from tools/esp8266/hmSystem.h rename to tools/esp8266/src/hm/hmSystem.h diff --git a/tools/esp8266/crc.cpp b/tools/esp8266/src/utils/crc.cpp similarity index 100% rename from tools/esp8266/crc.cpp rename to tools/esp8266/src/utils/crc.cpp diff --git a/tools/esp8266/crc.h b/tools/esp8266/src/utils/crc.h similarity index 100% rename from tools/esp8266/crc.h rename to tools/esp8266/src/utils/crc.h diff --git a/tools/esp8266/dbg.cpp b/tools/esp8266/src/utils/dbg.cpp similarity index 100% rename from tools/esp8266/dbg.cpp rename to tools/esp8266/src/utils/dbg.cpp diff --git a/tools/esp8266/include/dbg.h b/tools/esp8266/src/utils/dbg.h similarity index 100% rename from tools/esp8266/include/dbg.h rename to tools/esp8266/src/utils/dbg.h diff --git a/tools/esp8266/mqtt.h b/tools/esp8266/src/web/mqtt.h similarity index 99% rename from tools/esp8266/mqtt.h rename to tools/esp8266/src/web/mqtt.h index 4e637792..eb042f33 100644 --- a/tools/esp8266/mqtt.h +++ b/tools/esp8266/src/web/mqtt.h @@ -17,7 +17,7 @@ #define F(sl) (sl) #endif #include -#include "defines.h" +#include "../defines.h" class mqtt { public: diff --git a/tools/esp8266/web.cpp b/tools/esp8266/src/web/web.cpp similarity index 98% rename from tools/esp8266/web.cpp rename to tools/esp8266/src/web/web.cpp index 7fbb10eb..9220bc02 100644 --- a/tools/esp8266/web.cpp +++ b/tools/esp8266/src/web/web.cpp @@ -10,16 +10,16 @@ #include "web.h" -#include "html/h/index_html.h" -#include "html/h/login_html.h" -#include "html/h/style_css.h" -#include "html/h/api_js.h" -#include "html/h/favicon_ico_gz.h" -#include "html/h/setup_html.h" -#include "html/h/visualization_html.h" -#include "html/h/update_html.h" -#include "html/h/serial_html.h" -#include "html/h/system_html.h" +#include "../../html/h/index_html.h" +#include "../../html/h/login_html.h" +#include "../../html/h/style_css.h" +#include "../../html/h/api_js.h" +#include "../../html/h/favicon_ico_gz.h" +#include "../../html/h/setup_html.h" +#include "../../html/h/visualization_html.h" +#include "../../html/h/update_html.h" +#include "../../html/h/serial_html.h" +#include "../../html/h/system_html.h" const char* const pinArgNames[] = {"pinCs", "pinCe", "pinIrq", "pinLed0", "pinLed1"}; diff --git a/tools/esp8266/web.h b/tools/esp8266/src/web/web.h similarity index 98% rename from tools/esp8266/web.h rename to tools/esp8266/src/web/web.h index 2bb9f918..99805c8b 100644 --- a/tools/esp8266/web.h +++ b/tools/esp8266/src/web/web.h @@ -6,7 +6,7 @@ #ifndef __WEB_H__ #define __WEB_H__ -#include "dbg.h" +#include "../utils/dbg.h" #ifdef ESP32 #include "AsyncTCP.h" #include "Update.h" @@ -14,7 +14,7 @@ #include "ESPAsyncTCP.h" #endif #include "ESPAsyncWebServer.h" -#include "app.h" +#include "../app.h" #include "webApi.h" #define WEB_SERIAL_BUF_SIZE 2048 diff --git a/tools/esp8266/webApi.cpp b/tools/esp8266/src/web/webApi.cpp similarity index 100% rename from tools/esp8266/webApi.cpp rename to tools/esp8266/src/web/webApi.cpp diff --git a/tools/esp8266/webApi.h b/tools/esp8266/src/web/webApi.h similarity index 98% rename from tools/esp8266/webApi.h rename to tools/esp8266/src/web/webApi.h index 252b7c4c..519f2162 100644 --- a/tools/esp8266/webApi.h +++ b/tools/esp8266/src/web/webApi.h @@ -1,7 +1,7 @@ #ifndef __WEB_API_H__ #define __WEB_API_H__ -#include "dbg.h" +#include "../utils/dbg.h" #ifdef ESP32 #include "AsyncTCP.h" #else @@ -9,7 +9,7 @@ #endif #include "ESPAsyncWebServer.h" #include "AsyncJson.h" -#include "app.h" +#include "../app.h" class app; diff --git a/tools/esp8266/ahoywifi.cpp b/tools/esp8266/src/wifi/ahoywifi.cpp similarity index 100% rename from tools/esp8266/ahoywifi.cpp rename to tools/esp8266/src/wifi/ahoywifi.cpp diff --git a/tools/esp8266/ahoywifi.h b/tools/esp8266/src/wifi/ahoywifi.h similarity index 94% rename from tools/esp8266/ahoywifi.h rename to tools/esp8266/src/wifi/ahoywifi.h index c11610b5..f164571e 100644 --- a/tools/esp8266/ahoywifi.h +++ b/tools/esp8266/src/wifi/ahoywifi.h @@ -6,16 +6,16 @@ #ifndef __AHOYWIFI_H__ #define __AHOYWIFI_H__ -#include "dbg.h" +#include "../utils/dbg.h" // NTP #include #include #include -#include "defines.h" +#include "../defines.h" -#include "app.h" +#include "../app.h" class app;