ESP32 support added

* ESP32 adjustments, compiles and runs
* Changed gitignore to ignore debug log files
This commit is contained in:
tastendruecker123 2022-08-19 17:35:10 +02:00 committed by GitHub
parent 9ca1792480
commit 0ad53d56d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 153 additions and 50 deletions

View file

@ -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){