mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-09 23:16:38 +02:00
ESP32 support added
* ESP32 adjustments, compiles and runs * Changed gitignore to ignore debug log files
This commit is contained in:
parent
9ca1792480
commit
0ad53d56d8
13 changed files with 153 additions and 50 deletions
|
@ -3,23 +3,24 @@
|
|||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if defined(ESP32) && defined(F)
|
||||
#undef F
|
||||
#define F(sl) (sl)
|
||||
#endif
|
||||
|
||||
#include "app.h"
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
app::app() {
|
||||
Serial.begin(115200);
|
||||
DPRINTLN(DBG_VERBOSE, F("app::app"));
|
||||
mEep = new eep();
|
||||
Serial.begin(115200);
|
||||
|
||||
mWifi = new wifi(this, &mSysConfig, &mConfig);
|
||||
|
||||
mWebInst = new web(this, &mSysConfig, &mConfig, mVersion);
|
||||
mWebInst->setup();
|
||||
mWifi = new ahoywifi(this, &mSysConfig, &mConfig);
|
||||
|
||||
resetSystem();
|
||||
loadDefaultConfig();
|
||||
loadDefaultConfig();
|
||||
|
||||
mSys = new HmSystemType();
|
||||
}
|
||||
|
@ -39,6 +40,9 @@ void app::setup(uint32_t timeout) {
|
|||
setupMqtt();
|
||||
#endif
|
||||
mSys->setup(&mConfig);
|
||||
|
||||
mWebInst = new web(this, &mSysConfig, &mConfig, mVersion);
|
||||
mWebInst->setup();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -430,7 +434,7 @@ void app::cbMqtt(char* topic, byte* payload, unsigned int length) {
|
|||
const char *token = strtok(topic, "/");
|
||||
while (token != NULL)
|
||||
{
|
||||
if (std::strcmp(token,"devcontrol")==0){
|
||||
if (strcmp(token,"devcontrol")==0){
|
||||
token = strtok(NULL, "/");
|
||||
uint8_t iv_id = std::stoi(token);
|
||||
if (iv_id >= 0 && iv_id <= MAX_NUM_INVERTERS){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue