Minor change to the Mic App UI , (adding colour warning indication, based on RF settings GAIN , AMP) (#1001)

* Add colour Power_tx UI warning to Mic App
* Cleaning compile warnings
This commit is contained in:
Brumi-2021 2023-05-17 12:26:14 +02:00 committed by GitHub
parent 1a829707f4
commit 6bb2a3559d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 146 additions and 45 deletions

View file

@ -165,6 +165,69 @@ private:
void update_gainlevel_styles(void);
};
class TransmitterView2 : public View {
public:
TransmitterView2(const Coord y);
~TransmitterView2();
void on_show() override;
void paint(Painter& painter) override;
private:
const Style style_power_low {
.font = font::fixed_8x16,
.background = Color::black(),
.foreground = Color::yellow(),
};
const Style style_power_med {
.font = font::fixed_8x16,
.background = Color::black(),
.foreground = Color::orange(),
};
const Style style_power_high {
.font = font::fixed_8x16,
.background = Color::black(),
.foreground = Color::red(),
};
Text text_gain {
{ 0, 3 * 8, 5 * 8, 1 * 16 },
"Gain:"
};
NumberField field_gain {
{ 5 * 8, 3 * 8 },
2,
{ max2837::tx::gain_db_range.minimum, max2837::tx::gain_db_range.maximum },
max2837::tx::gain_db_step,
' '
};
Text text_amp {
{ 8 * 8, 3 * 8, 5 * 8, 1 * 16 },
"Amp:"
};
NumberField field_amp {
{ 12 * 8, 3 * 8 },
2,
{ 0, 14 },
14,
' '
};
void on_tx_gain_changed(int32_t tx_gain);
void on_tx_amp_changed(bool rf_amp);
void update_gainlevel_styles(void);
};
} /* namespace ui */
#endif/*__UI_TRANSMITTER_H__*/