Moved webserver into taskmanager
This commit is contained in:
@ -27,9 +27,6 @@ using namespace std::chrono_literals;
|
||||
#include "screens.h"
|
||||
#include "presets.h"
|
||||
#include "statistics.h"
|
||||
#ifdef FEATURE_WEBSERVER
|
||||
#include "webserver.h"
|
||||
#endif
|
||||
#ifdef FEATURE_CLOUD
|
||||
#include "cloud.h"
|
||||
#include "udpcloud.h"
|
||||
@ -122,14 +119,6 @@ extern "C" void app_main()
|
||||
|
||||
currentMode = &modes::defaultMode;
|
||||
|
||||
#ifdef FEATURE_WEBSERVER
|
||||
bootLabel.redraw("webserver");
|
||||
initWebserver();
|
||||
#endif
|
||||
|
||||
bootLabel.redraw("potis");
|
||||
readPotis();
|
||||
|
||||
#ifdef FEATURE_CLOUD
|
||||
bootLabel.redraw("cloud");
|
||||
initCloud();
|
||||
@ -239,10 +228,6 @@ extern "C" void app_main()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_WEBSERVER
|
||||
handleWebserver();
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_BMS
|
||||
bms::update();
|
||||
#endif
|
||||
|
@ -18,6 +18,8 @@ void initPotis()
|
||||
raw_brems = std::nullopt;
|
||||
gas = std::nullopt;
|
||||
brems = std::nullopt;
|
||||
|
||||
readPotis();
|
||||
}
|
||||
|
||||
void readPotis()
|
||||
|
@ -54,6 +54,9 @@
|
||||
#ifdef FEATURE_BLE
|
||||
#include "ble_bobby.h"
|
||||
#endif
|
||||
#ifdef FEATURE_WEBSERVER
|
||||
#include "webserver.h"
|
||||
#endif
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@ -105,6 +108,9 @@ espcpputils::SchedulerTask schedulerTasksArr[] {
|
||||
#ifdef FEATURE_BLE
|
||||
espcpputils::SchedulerTask { "ble", initBle, handleBle, 100ms },
|
||||
#endif
|
||||
#ifdef FEATURE_WEBSERVER
|
||||
espcpputils::SchedulerTask { "webserver", initWebserver, handleWebserver, 100ms },
|
||||
#endif
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
Reference in New Issue
Block a user