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