mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-15 03:47:42 +00:00
Added Bias-T toggle confirmation
Backlight setting save bugfix Updated binary
This commit is contained in:
@@ -216,8 +216,6 @@ void SetPlayDeadView::focus() {
|
||||
}
|
||||
|
||||
SetUIView::SetUIView(NavigationView& nav) {
|
||||
uint32_t ui_config;
|
||||
|
||||
add_children({
|
||||
&checkbox_login,
|
||||
&checkbox_bloff,
|
||||
@@ -226,24 +224,26 @@ SetUIView::SetUIView(NavigationView& nav) {
|
||||
&button_ok
|
||||
});
|
||||
|
||||
ui_config = portapack::persistent_memory::ui_config();
|
||||
checkbox_showsplash.set_value(persistent_memory::config_splash());
|
||||
checkbox_login.set_value(persistent_memory::config_login());
|
||||
|
||||
if (ui_config & 1) checkbox_showsplash.set_value(true);
|
||||
if (ui_config & 2) checkbox_bloff.set_value(true);
|
||||
if (ui_config & 16) checkbox_login.set_value(true);
|
||||
options_bloff.set_selected_index((ui_config >> 5) & 7);
|
||||
uint32_t backlight_timer = persistent_memory::config_backlight_timer();
|
||||
|
||||
if (backlight_timer) {
|
||||
checkbox_bloff.set_value(true);
|
||||
options_bloff.set_by_value(backlight_timer);
|
||||
} else {
|
||||
options_bloff.set_selected_index(0);
|
||||
}
|
||||
|
||||
button_ok.on_select = [&nav, &ui_config, this](Button&) {
|
||||
ui_config &= ~0b10011;
|
||||
button_ok.on_select = [&nav, this](Button&) {
|
||||
if (checkbox_bloff.value())
|
||||
persistent_memory::set_config_backlight_timer(options_bloff.selected_index() + 1);
|
||||
else
|
||||
persistent_memory::set_config_backlight_timer(0);
|
||||
|
||||
if (checkbox_login.value()) {
|
||||
portapack::persistent_memory::set_playing_dead(0x5920C1DF); // Enable
|
||||
ui_config |= (1 << 4);
|
||||
}
|
||||
if (checkbox_showsplash.value()) ui_config |= (1 << 0);
|
||||
if (checkbox_bloff.value()) ui_config |= (1 << 1);
|
||||
|
||||
portapack::persistent_memory::set_ui_config(ui_config);
|
||||
persistent_memory::set_config_splash(checkbox_showsplash.value());
|
||||
persistent_memory::set_config_login(checkbox_login.value());
|
||||
nav.pop();
|
||||
};
|
||||
}
|
||||
|
@@ -247,11 +247,11 @@ private:
|
||||
{ 52, 6 * 16 + 8 },
|
||||
10,
|
||||
{
|
||||
{ "5 seconds", 0 },
|
||||
{ "15 seconds", 1 },
|
||||
{ "1 minute", 2 },
|
||||
{ "5 minutes", 3 },
|
||||
{ "10 minutes", 4 }
|
||||
{ "5 seconds", 5 },
|
||||
{ "15 seconds", 15 },
|
||||
{ "1 minute", 60 },
|
||||
{ "5 minutes", 300 },
|
||||
{ "10 minutes", 600 }
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user