mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-22 06:29:31 -04:00
Added bias-T status icon
Merged radio settings in one screen
This commit is contained in:
parent
8b9ecda1a0
commit
3193c6ee99
152 changed files with 487 additions and 803 deletions
|
@ -76,6 +76,8 @@
|
|||
#include "file.hpp"
|
||||
#include "png_writer.hpp"
|
||||
|
||||
using portapack::receiver_model;
|
||||
|
||||
namespace ui {
|
||||
|
||||
/* SystemStatusView ******************************************************/
|
||||
|
@ -95,19 +97,20 @@ SystemStatusView::SystemStatusView() {
|
|||
//&button_textentry,
|
||||
&button_camera,
|
||||
&button_sleep,
|
||||
&image_bias_tee,
|
||||
&sd_card_status_view,
|
||||
});
|
||||
|
||||
button_back.id = -1; // Special ID used by FocusManager
|
||||
title.set_style(&style_systemstatus);
|
||||
|
||||
if (portapack::persistent_memory::stealth_mode())
|
||||
button_stealth.set_foreground(ui::Color::green());
|
||||
|
||||
/*if (!portapack::persistent_memory::ui_config_textentry())
|
||||
button_textentry.set_bitmap(&bitmap_icon_keyboard);
|
||||
else
|
||||
button_textentry.set_bitmap(&bitmap_icon_unistroke);*/
|
||||
|
||||
if (portapack::persistent_memory::stealth_mode())
|
||||
button_stealth.set_foreground(ui::Color::green());
|
||||
|
||||
button_back.on_select = [this](ImageButton&){
|
||||
if (this->on_back)
|
||||
|
@ -132,6 +135,16 @@ SystemStatusView::SystemStatusView() {
|
|||
};
|
||||
}
|
||||
|
||||
void SystemStatusView::refresh() {
|
||||
if (receiver_model.antenna_bias()) {
|
||||
image_bias_tee.set_bitmap(&bitmap_icon_biast_on);
|
||||
image_bias_tee.set_foreground(ui::Color::green());
|
||||
} else {
|
||||
image_bias_tee.set_bitmap(&bitmap_icon_biast_off);
|
||||
image_bias_tee.set_foreground(ui::Color::light_grey());
|
||||
}
|
||||
}
|
||||
|
||||
void SystemStatusView::set_back_enabled(bool new_value) {
|
||||
button_back.set_foreground(new_value ? Color::white() : Color::dark_grey());
|
||||
button_back.set_focusable(new_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue