Implemented back interface for remaining menus
This commit is contained in:
@@ -20,6 +20,7 @@ constexpr char TEXT_ESPINFO[] = "ESP info:";
|
||||
class AboutMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_ABOUT>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_VERSION>, DummyAction>,
|
||||
makeComponent<MenuItem, StaticText<nullptr>, DummyAction>,
|
||||
|
@@ -50,6 +50,7 @@ public:
|
||||
class AccessPointWifiSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_ACCESSPOINTWIFISETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<WifiSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, WifiSoftApGetStationNumText, StaticFont<2>, DisabledColor, DummyAction>,
|
||||
makeComponent<MenuItem, WifiSoftApIpText, StaticFont<2>, DisabledColor, DummyAction>,
|
||||
|
@@ -22,6 +22,7 @@ namespace {
|
||||
class BluetoothSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_BLUETOOTHSETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, BluetoothAvailableText, DisabledColor, DummyAction>,
|
||||
makeComponent<MenuItem, BluetoothHasClientText, DisabledColor, DummyAction>,
|
||||
|
@@ -37,6 +37,7 @@ using BremsMaxChangeScreen = makeComponent<ChangeValueDisplay<int16_t>, StaticTe
|
||||
class BoardcomputerHardwareSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_BOARDCOMPUTERHARDWARESETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, GasText, DisabledColor, StaticFont<2>, DummyAction>,
|
||||
makeComponent<MenuItem, BremsText, DisabledColor, StaticFont<2>, DummyAction>,
|
||||
|
@@ -39,6 +39,7 @@ using ReverseBeepDuration1ChangeScreen = makeComponent<ChangeValueDisplay<int16_
|
||||
class BuzzerMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_BUZZER>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_FRONTFREQ>, SwitchScreenAction<FrontFreqChangeScreen>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_FRONTPATTERN>, SwitchScreenAction<FrontPatternChangeScreen>>,
|
||||
|
@@ -19,6 +19,7 @@ template<const char *Ttext, typename Ttexts>
|
||||
class CommandDebugMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<Ttext>,
|
||||
public BackActionInterface<SwitchScreenAction<DebugMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, typename Ttexts::BuzzerFreqText, DisabledColor, DummyAction>,
|
||||
makeComponent<MenuItem, typename Ttexts::BuzzerPatternText, DisabledColor, DummyAction>,
|
||||
|
@@ -30,6 +30,7 @@ using NumMagnetPolesChangeScreen = makeComponent<ChangeValueDisplay<int16_t>, St
|
||||
class ControllerHardwareSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_CONTROLLERHARDWARESETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETENABLED>, SwitchScreenAction<EnableMenu>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETINVERTED>, SwitchScreenAction<InvertMenu>>,
|
||||
|
@@ -32,6 +32,7 @@ using DefaultModeBrems2WertChangeDisplay = makeComponent<ChangeValueDisplay<int1
|
||||
class DefaultModeSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_DEFAULTMODESETTIGNS>,
|
||||
public BackActionInterface<SwitchScreenAction<ModesSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETCONTROLTYPE>, SwitchScreenAction<DefaultModeCtrlTypChangeDisplay>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETCONTROLMODE>, SwitchScreenAction<DefaultModeCtrlModChangeDisplay>>,
|
||||
|
@@ -121,6 +121,7 @@ constexpr char TEXT_DEBUGTOGGLE[] = "Toggle";
|
||||
class DynamicDebugMenu :
|
||||
public MenuDisplay,
|
||||
public RandomText,
|
||||
public BackActionInterface<SwitchScreenAction<DebugMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
// dummy items to allow for scrolling
|
||||
makeComponent<MenuItem, StaticText<TEXT_DUMMYITEM>, DummyAction>,
|
||||
|
@@ -19,6 +19,7 @@ namespace {
|
||||
class EnableMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_SETENABLED>,
|
||||
public BackActionInterface<SwitchScreenAction<ControllerHardwareSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_ENABLEFRONTLEFT>, ToggleBoolAction, CheckboxIcon, FrontLeftEnabledAccessor>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_ENABLEFRONTRIGHT>, ToggleBoolAction, CheckboxIcon, FrontRightEnabledAccessor>,
|
||||
|
@@ -20,6 +20,7 @@ template<const char *Ttext, typename Ttexts, template<int> class ColorInterface>
|
||||
class FeedbackDebugMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<Ttext>,
|
||||
public BackActionInterface<SwitchScreenAction<DebugMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, typename Ttexts::BatVoltageText, ColorInterface<TFT_DARKGREY>, DummyAction>,
|
||||
makeComponent<MenuItem, typename Ttexts::BatVoltageFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>,
|
||||
|
@@ -67,6 +67,7 @@ using WifiTxPowerChangeScreen = makeComponent<ChangeValueDisplay<wifi_power_t>,
|
||||
class GenericWifiSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_GENERICWIFISETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<WifiSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, WifiStatusBitsText, DisabledColor, DummyAction>,
|
||||
makeComponent<MenuItem, WifiChannelText, DisabledColor, DummyAction>,
|
||||
|
@@ -19,6 +19,7 @@ namespace {
|
||||
class InvertMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_SETINVERTED>,
|
||||
public BackActionInterface<SwitchScreenAction<ControllerHardwareSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_INVERTFRONTLEFT>, ToggleBoolAction, CheckboxIcon, FrontLeftInvertedAccessor>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_INVERTFRONTRIGHT>, ToggleBoolAction, CheckboxIcon, FrontRightInvertedAccessor>,
|
||||
|
@@ -22,6 +22,7 @@ using LarsmModeIterationsChangeDisplay = makeComponent<ChangeValueDisplay<uint8_
|
||||
class LarsmModeSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_LARSMMODESETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<ModesSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_LARSMMODECHANGEMODE>, SwitchScreenAction<LarsmModeModeChangeDisplay>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_LARSMMODECHANGEITERATIONS>, SwitchScreenAction<LarsmModeIterationsChangeDisplay>>,
|
||||
|
@@ -26,6 +26,7 @@ using PhaseAdvMaxChangeScreen = makeComponent<ChangeValueDisplay<int16_t>, Stati
|
||||
class LimitsSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_LIMITSSETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETIMOTMAX>, SwitchScreenAction<IMotMaxChangeScreen>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETIDCMAX>, SwitchScreenAction<IDcMaxChangeScreen>>,
|
||||
|
@@ -18,6 +18,7 @@ namespace {
|
||||
class ModesSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_MODESSETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_DEFAULTMODESETTIGNS>, SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_TEMPOMATMODESETTINGS>, SwitchScreenAction<TempomatModeSettingsMenu>>,
|
||||
|
@@ -20,6 +20,7 @@ template<const char *Ttext, typename Ttexts, template<int> class ColorInterface>
|
||||
class MotorFeedbackDebugMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<Ttext>,
|
||||
public BackActionInterface<SwitchScreenAction<DebugMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, typename Ttexts::AngleText, ColorInterface<TFT_DARKGREY>, DummyAction>,
|
||||
makeComponent<MenuItem, typename Ttexts::SpeedText, ColorInterface<TFT_DARKGREY>, DummyAction>,
|
||||
|
@@ -19,6 +19,7 @@ template<const char *Ttext, typename Ttexts>
|
||||
class MotorStateDebugMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<Ttext>,
|
||||
public BackActionInterface<SwitchScreenAction<DebugMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, typename Ttexts::EnableText, DisabledColor, DummyAction>,
|
||||
makeComponent<MenuItem, typename Ttexts::PwmText, DisabledColor, DummyAction>,
|
||||
|
@@ -112,6 +112,7 @@ public:
|
||||
class StationWifiSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_STATIONWIFISETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<WifiSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_WIFIRECONNECT>, WifiReconnectAction>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_WIFIDISCONNECT>, WifiDisconnectAction>,
|
||||
|
@@ -22,6 +22,7 @@ using TempomatModeCtrlModChangeScreen = makeComponent<ChangeValueDisplay<Control
|
||||
class TempomatModeSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_TEMPOMATMODESETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<ModesSettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETCONTROLTYPE>, SwitchScreenAction<TempomatModeCtrlTypChangeScreen>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_SETCONTROLMODE>, SwitchScreenAction<TempomatModeCtrlModChangeScreen>>,
|
||||
|
@@ -18,7 +18,7 @@ class WifiSettingsMenu;
|
||||
}
|
||||
|
||||
namespace {
|
||||
class WifiScanMenu : public MenuDisplay
|
||||
class WifiScanMenu : public MenuDisplay, public BackActionInterface<SwitchScreenAction<WifiSettingsMenu>>
|
||||
{
|
||||
using Base = MenuDisplay;
|
||||
|
||||
|
@@ -20,6 +20,7 @@ namespace {
|
||||
class WifiSettingsMenu :
|
||||
public MenuDisplay,
|
||||
public StaticText<TEXT_WIFISETTINGS>,
|
||||
public BackActionInterface<SwitchScreenAction<SettingsMenu>>,
|
||||
public StaticMenuDefinition<
|
||||
makeComponent<MenuItem, StaticText<TEXT_GENERICWIFISETTINGS>, SwitchScreenAction<GenericWifiSettingsMenu>>,
|
||||
makeComponent<MenuItem, StaticText<TEXT_STATIONWIFISETTINGS>, SwitchScreenAction<StationWifiSettingsMenu>>,
|
||||
|
Reference in New Issue
Block a user