update firmware v1.2.4 (#16)

This commit is contained in:
Forairaaaaa
2026-04-20 16:27:36 +08:00
committed by GitHub
parent 605b575fcc
commit dd34f9e0ec
94 changed files with 3615 additions and 41513 deletions
@@ -13,6 +13,7 @@
#include <hal/hal.h>
#include <functional>
#include <vector>
#include <apps/common/loading_page/loading_page.h>
using namespace uitk;
using namespace uitk::lvgl_cpp;
@@ -294,3 +295,35 @@ void FwVersionWorker::update()
_egg->update();
}
}
SystemUpdateWorker::SystemUpdateWorker()
{
auto loading_page = std::make_unique<view::LoadingPage>(0xF6F6F6, 0x26206A);
GetHAL().lvglUnlock();
// Start network
GetHAL().startNetwork([&](std::string_view msg) {
LvglLockGuard lock;
loading_page->setMessage(msg);
});
// Update Firmware
bool result = GetHAL().updateFirmware([&](std::string_view msg) {
LvglLockGuard lock;
loading_page->setMessage(msg);
});
// Hold the result for a while
GetHAL().delay(3000);
GetHAL().lvglLock();
_is_done = true;
}
SystemUpdateWorker::~SystemUpdateWorker()
{
}
void SystemUpdateWorker::update()
{
}