[Review] Review Update

This commit is contained in:
devdl11
2022-04-07 22:18:05 +02:00
parent 15801ae9e4
commit c65b1c6d3c
7 changed files with 10 additions and 11 deletions

View File

@@ -147,8 +147,7 @@ bool AppsContainer::dispatchEvent(Ion::Events::Event event) {
* pictogram. */
updateBatteryState();
if (switchTo(usbConnectedAppSnapshot())) {
Ion::USB::DFU(true
);
Ion::USB::DFU(true);
// Update LED when exiting DFU mode
Ion::LED::updateColorWithPlugAndCharge();
bool switched = switchTo(activeSnapshot);

View File

@@ -98,7 +98,7 @@ void Boot::installerMenu() {
continue;
} else if (scan == Ion::Keyboard::State(Ion::Keyboard::Key::Two)) {
scan = Ion::Keyboard::State(Ion::Keyboard::Key::Back);
blupdate();
bootloaderUpdate();
continue;
} else if (scan == Ion::Keyboard::State(Ion::Keyboard::Key::OnOff)) {
Ion::Power::standby(); // Force a core reset to exit
@@ -127,11 +127,11 @@ void Boot::aboutMenu() {
}
void Boot::blupdate() {
USBData data = USBData::BLUPDATE();
void Boot::bootloaderUpdate() {
USBData data = USBData::BOOTLOADER_UPDATE();
for (;;) {
Bootloader::Interface::drawBLUpdate();
Bootloader::Interface::drawBootloaderUpdate();
Ion::USB::enable();
do {
uint64_t scan = Ion::Keyboard::scan();

View File

@@ -24,7 +24,7 @@ public:
static void bootloader();
static void aboutMenu();
static void installerMenu();
static void blupdate();
static void bootloaderUpdate();
static void bootSlot(Bootloader::Slot slot);
static void lockInternal();
};

View File

@@ -283,7 +283,7 @@ void Interface::drawInstallerSelection() {
ctx->drawString(Messages::installerText3, KDPoint(initPos, y), KDFont::SmallFont, KDColorBlack, KDColorWhite);
}
void Interface::drawBLUpdate() {
void Interface::drawBootloaderUpdate() {
Interface::drawHeader();
KDContext * ctx = KDIonContext::sharedContext();
int y = ImageStore::Computer->height() + (KDFont::LargeFont->glyphSize().height() + 10) + (KDFont::SmallFont->glyphSize().height() + 10);

View File

@@ -21,7 +21,7 @@ public:
static void drawCrash(const char * error);
static void drawRecovery();
static void drawInstallerSelection();
static void drawBLUpdate();
static void drawBootloaderUpdate();
static void drawEpsilonAdvertisement();
};

View File

@@ -30,7 +30,7 @@ const Bootloader::USBData Bootloader::USBData::DEFAULT() {
return USBData("@Flash/0x90000000/08*004Kg,01*032Kg,63*064Kg,64*064Kg", Messages::upsilonBootloader, DFUData());
}
const Bootloader::USBData Bootloader::USBData::BLUPDATE() {
const Bootloader::USBData Bootloader::USBData::BOOTLOADER_UPDATE() {
return USBData("@Flash/0x08000000/04*016Kg", Messages::bootloaderUpdate, DFUData(true, false));
}

View File

@@ -42,7 +42,7 @@ class USBData {
static const char * buildStringDescriptor(StringHeader header, uint32_t startAddress, uint32_t size);
static const USBData DEFAULT();
static const USBData BLUPDATE();
static const USBData BOOTLOADER_UPDATE();
static USBData Recovery(uint32_t startAddress, uint32_t size);
private: