Add some features to support RX-only mode (#2904)

* Remove duplicate LED control code
* Add TX limit settings and UI
* Fix App Manager to handle non-application menu items
This commit is contained in:
Harin Lee
2026-01-04 06:10:34 +09:00
committed by GitHub
parent 70ac1a03a1
commit ee97b51eb3
8 changed files with 144 additions and 43 deletions
+40
View File
@@ -264,6 +264,46 @@ class SetRadioView : public View {
SetFrequencyCorrectionModel form_collect();
};
class SetTXLimitView : public View {
public:
SetTXLimitView(NavigationView& nav);
void focus() override;
std::string title() const override { return "TX Limit"; };
private:
Labels labels{
{{1 * 8, 1 * 16}, "Limits RF TX Gain", Theme::getInstance()->fg_light->foreground},
{{1 * 8, 2 * 16}, "(This may affect", Theme::getInstance()->fg_light->foreground},
{{1 * 8, 3 * 16}, "all applications.)", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 8 * 16}, "TX Gain (Max):", Theme::getInstance()->fg_light->foreground},
};
NumberField tx_gain_max_db{
{20 * 8, 8 * 16},
6,
{0, 47},
1,
' ',
};
Checkbox tx_amp_disable_switch{
{1 * 8, 12 * 16},
23,
"Disable TX Amp"};
Button button_save{
{UI_POS_X_CENTER(12) - UI_POS_WIDTH(8), UI_POS_Y_BOTTOM(4), UI_POS_WIDTH(12), UI_POS_HEIGHT(2)},
"Save"};
Button button_cancel{
{UI_POS_X_CENTER(16) + UI_POS_WIDTH(8), UI_POS_Y_BOTTOM(4), UI_POS_WIDTH(12), UI_POS_HEIGHT(2)},
"Cancel",
};
};
using portapack::persistent_memory::backlight_timeout_t;
class SetUIView : public View {