Moved ota to taskmanager
This commit is contained in:
@ -25,10 +25,6 @@ using namespace std::chrono_literals;
|
||||
#include "macros_bobbycar.h"
|
||||
#include "globals.h"
|
||||
#include "screens.h"
|
||||
#ifdef FEATURE_OTA
|
||||
#include "ota.h"
|
||||
#include "displays/menus/selectbuildservermenu.h"
|
||||
#endif
|
||||
#include "presets.h"
|
||||
#include "statistics.h"
|
||||
#ifdef FEATURE_BLE
|
||||
@ -132,11 +128,6 @@ extern "C" void app_main()
|
||||
|
||||
currentMode = &modes::defaultMode;
|
||||
|
||||
#ifdef FEATURE_OTA
|
||||
bootLabel.redraw("ota");
|
||||
initOta();
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_BLE
|
||||
bootLabel.redraw("ble");
|
||||
initBle();
|
||||
@ -239,10 +230,6 @@ extern "C" void app_main()
|
||||
performance.lastTime = now;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_OTA
|
||||
handleOta();
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_BLE
|
||||
if (!lastBleUpdate || now - *lastBleUpdate >= 250ms)
|
||||
{
|
||||
|
@ -48,6 +48,9 @@
|
||||
#ifdef FEATURE_SERIAL
|
||||
#include "serial_bobby.h"
|
||||
#endif
|
||||
#ifdef FEATURE_OTA
|
||||
#include "ota.h"
|
||||
#endif
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@ -93,6 +96,9 @@ espcpputils::SchedulerTask schedulerTasksArr[] {
|
||||
#ifdef FEATURE_SERIAL
|
||||
espcpputils::SchedulerTask { "serial", initSerial, updateSerial, 50ms },
|
||||
#endif
|
||||
#ifdef FEATURE_OTA
|
||||
espcpputils::SchedulerTask { "ota", initOta, handleOta, 50ms },
|
||||
#endif
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
Reference in New Issue
Block a user