Merge pull request #310 from bobbycar-graz/push_pop_menus
This commit is contained in:
Submodule components/cpputils updated: 67b5294763...19f270489c
Submodule components/esp-gui-lib updated: 1fed239f6b...d0960025a2
Submodule components/espasyncota updated: 67d7c6d721...7090903ce3
Submodule components/espchrono updated: 9c57959705...272e99832b
Submodule components/espcpputils updated: 07594420e9...ed0c502249
Submodule components/espwifistack updated: c17062e1e8...118b03123e
2
esp-idf
2
esp-idf
Submodule esp-idf updated: 5b7d79a0a1...3ad551898d
@ -103,7 +103,7 @@ set(headers
|
||||
displays/menus/featureflagsmenu.h
|
||||
displays/menus/feedbackdebugmenu.h
|
||||
displays/menus/gametrakmodesettingsmenu.h
|
||||
displays/menus/garagenmenu.h
|
||||
displays/menus/garagemenu.h
|
||||
displays/menus/graphsmenu.h
|
||||
displays/menus/greenpassmenu.h
|
||||
displays/menus/handbremssettingsmenu.h
|
||||
@ -340,7 +340,7 @@ set(sources
|
||||
displays/menus/featureflagsmenu.cpp
|
||||
displays/menus/feedbackdebugmenu.cpp
|
||||
displays/menus/gametrakmodesettingsmenu.cpp
|
||||
displays/menus/garagenmenu.cpp
|
||||
displays/menus/garagemenu.cpp
|
||||
displays/menus/graphsmenu.cpp
|
||||
displays/menus/greenpassmenu.cpp
|
||||
displays/menus/handbremssettingsmenu.cpp
|
||||
|
@ -30,24 +30,23 @@ public:
|
||||
|
||||
void ModeSettingsAction::triggered()
|
||||
{
|
||||
if (
|
||||
currentMode == &modes::defaultMode
|
||||
#ifdef FEATURE_JOYSTICK
|
||||
if (currentMode == &modes::defaultMode
|
||||
#ifdef FEATURE_JOYSTICK
|
||||
|| currentMode == &modes::wheelchairMode
|
||||
#endif
|
||||
#endif
|
||||
)
|
||||
switchScreen<DefaultModeSettingsMenu>();
|
||||
pushScreen<DefaultModeSettingsMenu>();
|
||||
else if (currentMode == &modes::tempomatMode)
|
||||
switchScreen<TempomatModeSettingsMenu>();
|
||||
pushScreen<TempomatModeSettingsMenu>();
|
||||
else if (currentMode == &modes::larsmMode)
|
||||
switchScreen<LarsmModeSettingsMenu>();
|
||||
pushScreen<LarsmModeSettingsMenu>();
|
||||
else if (currentMode == &modes::mickMode)
|
||||
switchScreen<MickModeSettingsMenu>();
|
||||
pushScreen<MickModeSettingsMenu>();
|
||||
else if (currentMode == &modes::motortestMode)
|
||||
switchScreen<MotortestModeSettingsMenu>();
|
||||
pushScreen<MotortestModeSettingsMenu>();
|
||||
#ifdef FEATURE_GAMETRAK
|
||||
else if (currentMode == &modes::gametrakMode)
|
||||
switchScreen<GametrakModeSettingsMenu>();
|
||||
pushScreen<GametrakModeSettingsMenu>();
|
||||
#endif
|
||||
else
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
|
||||
void triggered() override
|
||||
{
|
||||
espgui::switchScreen<QrDisplay<TMenu>>(m_msg);
|
||||
espgui::pushScreen<QrDisplay<TMenu>>(m_msg);
|
||||
}
|
||||
private:
|
||||
std::string m_msg;
|
||||
@ -42,7 +42,7 @@ public:
|
||||
|
||||
void triggered() override
|
||||
{
|
||||
espgui::switchScreen<QrImportDisplay<TMenu>>(std::move(m_nvskey));
|
||||
espgui::pushScreen<QrImportDisplay<TMenu>>(std::move(m_nvskey));
|
||||
}
|
||||
private:
|
||||
std::string m_nvskey;
|
||||
|
@ -67,7 +67,7 @@ void BatteryGraphDisplay::buttonPressed(espgui::Button button)
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
espgui::switchScreen<BatteryMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -100,9 +100,11 @@ void BmsDisplay::buttonPressed(espgui::Button button)
|
||||
|
||||
switch (button)
|
||||
{
|
||||
case Button::Right: switchScreen<MainMenu>(); break;
|
||||
using espgui::Button;
|
||||
case Button::Right: pushScreen<MainMenu>(); break;
|
||||
case Button::Up: switchScreen<MetersDisplay>(); break;
|
||||
case Button::Down: switchScreen<StatusDisplay>();
|
||||
case Button::Down: switchScreen<StatusDisplay>(); break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -3,7 +3,6 @@
|
||||
#if defined(FEATURE_BLUETOOTH) && defined(FEATURE_BMS)
|
||||
// 3rdparty lib includes
|
||||
#include <fmt/core.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <widgets/label.h>
|
||||
#include <screenmanager.h>
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <popupdisplay.h>
|
||||
#include <messagepopupdisplay.h>
|
||||
|
||||
class BobbyPopupDisplay : public espgui::PopupDisplay
|
||||
class BobbyPopupDisplay : public espgui::MessagePopupDisplay
|
||||
{
|
||||
using Base = espgui::PopupDisplay;
|
||||
using Base = espgui::MessagePopupDisplay;
|
||||
|
||||
public:
|
||||
using Base::Base;
|
||||
|
@ -75,7 +75,7 @@ void ButtonCalibrateDisplay::update()
|
||||
return;
|
||||
}
|
||||
|
||||
espgui::switchScreen<BoardcomputerHardwareSettingsMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <menuitem.h>
|
||||
#include <icons/back.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <widgets/label.h>
|
||||
#include <fmt/core.h>
|
||||
|
||||
@ -122,7 +122,7 @@ CalibrateVoltageDisplay::CalibrateVoltageDisplay()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_VOLTAGECALIBRATION_30V>, Save30VCalibrationAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_VOLTAGECALIBRATION_50V>, Save50VCalibrationAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_APPLYCALIB>, BobbyCheckbox, BatteryApplyCalibrationAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<BatteryMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
|
||||
@ -141,5 +141,5 @@ std::string CalibrateVoltageDisplay::text() const
|
||||
|
||||
void CalibrateVoltageDisplay::back()
|
||||
{
|
||||
espgui::switchScreen<BatteryMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -3,13 +3,11 @@
|
||||
// 3rdparty lib includes
|
||||
#include <tftinstance.h>
|
||||
#include <screenmanager.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <esprandom.h>
|
||||
#include <randomutils.h>
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "icons/shortcircuit.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
@ -106,10 +104,8 @@ void ConfiscationDisplay::buttonPressed(espgui::Button button)
|
||||
|
||||
switch (button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
espgui::switchScreen<MainMenu>();
|
||||
break;
|
||||
using espgui::Button;
|
||||
case Button::Left: espgui::popScreen(); break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,6 @@
|
||||
#include <tftinstance.h>
|
||||
#include <screenmanager.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/demosmenu.h"
|
||||
|
||||
void GameOfLifeDisplay::start()
|
||||
{
|
||||
Base::start();
|
||||
@ -61,8 +58,7 @@ void GameOfLifeDisplay::buttonPressed(espgui::Button button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
espgui::switchScreen<DemosMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
void redraw() override;
|
||||
void stop() override;
|
||||
|
||||
void buttonPressed(espgui::Button button);
|
||||
void buttonPressed(espgui::Button button) override;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -83,7 +83,7 @@ void JoystickDebugDisplay::buttonPressed(espgui::Button button)
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
break;
|
||||
case Button::Left:
|
||||
espgui::switchScreen<BoardcomputerHardwareSettingsMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -3,9 +3,6 @@
|
||||
// system libs
|
||||
#include <optional>
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actions/switchscreenaction.h>
|
||||
|
||||
// local includes
|
||||
#include "bobbydisplaywithtitle.h"
|
||||
#include "modeinterface.h"
|
||||
|
@ -7,19 +7,16 @@
|
||||
#include <TFT_eSPI.h>
|
||||
#include <cpputils.h>
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actioninterface.h>
|
||||
#include <tftinstance.h>
|
||||
#include <screenmanager.h>
|
||||
#include <actions/dummyaction.h>
|
||||
|
||||
// local includes
|
||||
#include "menudisplay.h"
|
||||
#include "utils.h"
|
||||
#include "icons/back.h"
|
||||
#include "icons/bobbycar.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "globals.h"
|
||||
#include "displays/menus/ledstripmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_LEDSTRIPCOLORMENU[] = "Customize Ledstrip";
|
||||
@ -101,7 +98,7 @@ void LedstripColorsDisplay::buttonPressed(espgui::Button button)
|
||||
case Button::Left:
|
||||
if(!state_select_color)
|
||||
{
|
||||
espgui::switchScreen<LedstripMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -10,9 +10,9 @@
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "utils.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "displays/potiscalibratedisplay.h"
|
||||
#include "bobbybuttons.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
namespace {
|
||||
bool isValid1stPin(std::array<int8_t, 4> enteredPin)
|
||||
@ -109,7 +109,7 @@ void Lockscreen::redraw()
|
||||
if (!gas || !brems || *gas > 200.f || *brems > 200.f)
|
||||
espgui::switchScreen<PotisCalibrateDisplay>(true);
|
||||
else
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
#ifdef LOCKSCREEN_PLUGIN
|
||||
#include LOCKSCREEN_PLUGIN
|
||||
LOCKSCREEN_PLUGIN_FIXES_1
|
||||
|
@ -3,7 +3,7 @@
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "esptexthelpers.h"
|
||||
#include "displays/menus/settingsmenu.h"
|
||||
@ -56,7 +56,7 @@ AboutMenu::AboutMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, EspSketchSizeText, StaticFont<2>, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EspSketchMd5Text, StaticFont<2>, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EspFreeSketchSpaceText, StaticFont<2>, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string AboutMenu::text() const
|
||||
@ -66,5 +66,5 @@ std::string AboutMenu::text() const
|
||||
|
||||
void AboutMenu::back()
|
||||
{
|
||||
espgui::switchScreen<SettingsMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -4,11 +4,10 @@
|
||||
#include <menuitem.h>
|
||||
#include <icons/back.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <fmt/core.h>
|
||||
|
||||
// local includes
|
||||
#include "debugmenu.h"
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "utils.h"
|
||||
#include "icons/settings.h"
|
||||
@ -82,7 +81,7 @@ BatteryDebugMenu::BatteryDebugMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, BatteryDebug2Text, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, BatteryDebug3Text, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, CurrentAdvancedBatteryPercentageText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string BatteryDebugMenu::text() const
|
||||
@ -92,5 +91,5 @@ std::string BatteryDebugMenu::text() const
|
||||
|
||||
void BatteryDebugMenu::back()
|
||||
{
|
||||
espgui::switchScreen<DebugMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <menuitem.h>
|
||||
#include <icons/back.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <changevaluedisplay.h>
|
||||
#include <textwithvaluehelper.h>
|
||||
#include <fmt/core.h>
|
||||
@ -12,6 +13,11 @@
|
||||
#include <tftinstance.h>
|
||||
|
||||
// Local includes
|
||||
#include "utils.h"
|
||||
#include "icons/settings.h"
|
||||
#include "battery.h"
|
||||
#include "displays/bobbychangevaluedisplay.h"
|
||||
#include "displays/calibratevoltagedisplay.h"
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "battery.h"
|
||||
#include "displays/batterygraphdisplay.h"
|
||||
@ -50,24 +56,24 @@ using BatteryCellSeriesChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_CELL_SERIES>,
|
||||
BatterySeriesCellsAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BatteryMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BatteryMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using BatteryCellParallelChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_CELL_PARALLEL>,
|
||||
BatteryParallelCellsAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BatteryMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BatteryMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using BatteryWHperKMChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint16_t>,
|
||||
espgui::StaticText<TEXT_BATTERY_WHKM>,
|
||||
BatteryWHperKMAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BatteryMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BatteryMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -77,15 +83,15 @@ BatteryMenu::BatteryMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, CurrentBatteryStatusText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CELL_SERIES, BatterySeriesCellsAccessor>, SwitchScreenAction<BatteryCellSeriesChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CELL_PARALLEL, BatteryParallelCellsAccessor>, SwitchScreenAction<BatteryCellParallelChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BATTERY_WHKM, BatteryWHperKMAccessor>, SwitchScreenAction<BatteryWHperKMChangeScreen>>>();
|
||||
constructMenuItem<SwitchScreenTypeSafeChangeMenuItem<BatteryCellType, BatteryMenu, TEXT_SELECT_CELL_TYPE>>(&configs.battery.cellType);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SHOW_BATTERY_GRAPH>, SwitchScreenAction<BatteryGraphDisplay>, StaticMenuItemIcon<&bobbyicons::graph>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CELL_SERIES, BatterySeriesCellsAccessor>, PushScreenAction<BatteryCellSeriesChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CELL_PARALLEL, BatteryParallelCellsAccessor>, PushScreenAction<BatteryCellParallelChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BATTERY_WHKM, BatteryWHperKMAccessor>, PushScreenAction<BatteryWHperKMChangeScreen>>>();
|
||||
constructMenuItem<PushScreenTypeSafeChangeMenuItem<BatteryCellType, TEXT_SELECT_CELL_TYPE>>(&configs.battery.cellType);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SHOW_BATTERY_GRAPH>, PushScreenAction<BatteryGraphDisplay>, StaticMenuItemIcon<&bobbyicons::graph>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WhStatisticsText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_CALIBRATE>, SwitchScreenAction<CalibrateVoltageDisplay>, StaticMenuItemIcon<&bobbyicons::settings>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_CALIBRATE>, PushScreenAction<CalibrateVoltageDisplay>, StaticMenuItemIcon<&bobbyicons::settings>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string BatteryMenu::text() const
|
||||
@ -129,5 +135,5 @@ void BatteryMenu::redraw()
|
||||
|
||||
void BatteryMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <changevaluedisplay.h>
|
||||
#include <changevaluedisplay_string.h>
|
||||
@ -26,8 +27,8 @@ using ApSsidChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<std::string>,
|
||||
espgui::StaticText<TEXT_NAME>,
|
||||
BluetoothNameAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BleSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BleSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -37,8 +38,8 @@ BleSettingsMenu::BleSettingsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLED>, BobbyCheckbox, BleEnabledAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, BleServerPeerDevicesText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, BleCharacSubscribedText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NAME_FORMATTED, BluetoothNameAccessor>, SwitchScreenAction<ApSsidChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NAME_FORMATTED, BluetoothNameAccessor>, PushScreenAction<ApSsidChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string BleSettingsMenu::text() const
|
||||
@ -48,5 +49,5 @@ std::string BleSettingsMenu::text() const
|
||||
|
||||
void BleSettingsMenu::back()
|
||||
{
|
||||
espgui::switchScreen<SettingsMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -10,10 +10,9 @@
|
||||
#include "actions/bmsturnoffchargeaction.h"
|
||||
#include "actions/bmsturnondischargeaction.h"
|
||||
#include "actions/bmsturnoffdischargeaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "bluetoothtexthelpers.h"
|
||||
#include "icons/back.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
using namespace espgui;
|
||||
using namespace bluetoothtexthelpers;
|
||||
@ -27,11 +26,11 @@ BmsMenu::BmsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TURNOFFCHARGE>, BmsTurnOffChargeAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TURNONDISCHARGE>, BmsTurnOnDischargeAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TURNOFFDISCHARGE>, BmsTurnOffDischargeAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
void BmsMenu::back()
|
||||
{
|
||||
switchSreen<MainMenu>();
|
||||
popSreen();
|
||||
}
|
||||
#endif
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <fmt/core.h>
|
||||
#include <changevaluedisplay.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <textwithvaluehelper.h>
|
||||
|
||||
@ -76,36 +77,36 @@ using SampleCountChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SAMPLECOUNT>,
|
||||
SampleCountAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GasMinChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_GASMIN>,
|
||||
GasMinAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GasMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_GASMAX>,
|
||||
GasMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using BremsMinChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_BREMSMIN>,
|
||||
BremsMinAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using BremsMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_BREMSMAX>,
|
||||
BremsMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
|
||||
@ -114,15 +115,15 @@ using DPadDebounceChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_DPADDEBOUNCE>,
|
||||
DPadDebounceAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using ButtonDelayChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint16_t>,
|
||||
espgui::StaticText<TEXT_BUTTONDELAY>,
|
||||
ButtonDelayAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
#endif
|
||||
|
||||
@ -144,43 +145,43 @@ using GametrakXMinChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SETGAMETRAKXMIN>,
|
||||
GametrakXMinAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GametrakXMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SETGAMETRAKXMAX>,
|
||||
GametrakXMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GametrakYMinChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SETGAMETRAKYMIN>,
|
||||
GametrakYMinAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GametrakYMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SETGAMETRAKYMAX>,
|
||||
GametrakYMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GametrakDistMinChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SETGAMETRAKDISTMIN>,
|
||||
GametrakDistMinAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using GametrakDistMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SETGAMETRAKDISTMAX>,
|
||||
GametrakDistMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BoardcomputerHardwareSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
#endif
|
||||
} // namespace
|
||||
@ -189,41 +190,41 @@ using namespace espgui;
|
||||
|
||||
BoardcomputerHardwareSettingsMenu::BoardcomputerHardwareSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOCKSCREENSETTINGS>, SwitchScreenAction<LockscreenSettingsMenu>, StaticMenuItemIcon<&bobbyicons::lock>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BUTTONCALIBRATE>, SwitchScreenAction<ButtonCalibrateDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_EXTRABUTTONCALIBRATE>, SwitchScreenAction<ExtraButtonCalibrateMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_QUICKACTIONS>, SwitchScreenAction<SetupQuickActionsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOCKSCREENSETTINGS>, PushScreenAction<LockscreenSettingsMenu>, StaticMenuItemIcon<&bobbyicons::lock>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BUTTONCALIBRATE>, PushScreenAction<ButtonCalibrateDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_EXTRABUTTONCALIBRATE>, PushScreenAction<ExtraButtonCalibrateMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_QUICKACTIONS>, PushScreenAction<SetupQuickActionsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, GasText, DisabledColor, StaticFont<2>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, BremsText, DisabledColor, StaticFont<2>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POTISCALIBRATE>, SwitchScreenAction<PotisCalibrateDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POTISCALIBRATE>, PushScreenAction<PotisCalibrateDisplay>>>();
|
||||
#ifdef FEATURE_JOYSTICK
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_JOYSTICK>, SwitchScreenAction<JoystickDebugDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_JOYSTICK>, PushScreenAction<JoystickDebugDisplay>>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SAMPLECOUNT, SampleCountAccessor>, SwitchScreenAction<SampleCountChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_GASMIN, GasMinAccessor>, SwitchScreenAction<GasMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_GASMAX, GasMaxAccessor>, SwitchScreenAction<GasMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BREMSMIN, BremsMinAccessor>, SwitchScreenAction<BremsMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BREMSMAX, BremsMaxAccessor>, SwitchScreenAction<BremsMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SAMPLECOUNT, SampleCountAccessor>, PushScreenAction<SampleCountChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_GASMIN, GasMinAccessor>, PushScreenAction<GasMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_GASMAX, GasMaxAccessor>, PushScreenAction<GasMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BREMSMIN, BremsMinAccessor>, PushScreenAction<BremsMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BREMSMAX, BremsMaxAccessor>, PushScreenAction<BremsMaxChangeScreen>>>();
|
||||
#if defined(FEATURE_DPAD) || defined(FEATURE_DPAD_3WIRESW) || defined(FEATURE_DPAD_5WIRESW) || defined(FEATURE_DPAD_5WIRESW_2OUT) || defined (FEATURE_DPAD_6WIRESW)
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_DPADDEBOUNCE, DPadDebounceAccessor>, SwitchScreenAction<DPadDebounceChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BUTTONDELAY, ButtonDelayAccessor>, SwitchScreenAction<ButtonDelayChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_DPADDEBOUNCE, DPadDebounceAccessor>, PushScreenAction<DPadDebounceChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BUTTONDELAY, ButtonDelayAccessor>, PushScreenAction<ButtonDelayChangeScreen>>>();
|
||||
#endif
|
||||
#ifdef FEATURE_GAMETRAK
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>,
|
||||
constructMenuItem<makeComponent<MenuItem, GametrakXText, DisabledColor, StaticFont<2>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, GametrakYText, DisabledColor, StaticFont<2>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, GametrakDistText, DisabledColor, StaticFont<2>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMETRAKCALIBRATE>, SwitchScreenAction<GametrakCalibrateDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKXMIN>, SwitchScreenAction<GametrakXMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKXMAX>, SwitchScreenAction<GametrakXMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKYMIN>, SwitchScreenAction<GametrakYMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKYMAX>, SwitchScreenAction<GametrakYMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKDISTMIN>, SwitchScreenAction<GametrakDistMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKDISTMAX>, SwitchScreenAction<GametrakDistMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMETRAKCALIBRATE>, PushScreenAction<GametrakCalibrateDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKXMIN>, PushScreenAction<GametrakXMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKXMAX>, PushScreenAction<GametrakXMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKYMIN>, PushScreenAction<GametrakYMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKYMAX>, PushScreenAction<GametrakYMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKDISTMIN>, PushScreenAction<GametrakDistMinChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETGAMETRAKDISTMAX>, PushScreenAction<GametrakDistMaxChangeScreen>>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TIMERS>, SwitchScreenAction<TimersMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TIMERS>, PushScreenAction<TimersMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string BoardcomputerHardwareSettingsMenu::text() const
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include "changevaluedisplay.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
@ -32,8 +33,8 @@ using FrontFreqChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_FRONTFREQ>,
|
||||
FrontFreqAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
struct FrontPatternAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.front.command.buzzer.pattern; } };
|
||||
@ -41,8 +42,8 @@ using FrontPatternChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_FRONTPATTERN>,
|
||||
FrontPatternAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
struct BackFreqAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.back.command.buzzer.freq; } };
|
||||
@ -50,8 +51,8 @@ using BackFreqChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_BACKFREQ>,
|
||||
BackFreqAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
struct BackPatternAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.back.command.buzzer.pattern; } };
|
||||
@ -59,37 +60,37 @@ using BackPatternChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_BACKPATTERN>,
|
||||
BackPatternAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using ReverseBeepFreq0ChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_REVERSEBEEPFREQ0>,
|
||||
ReverseBeepFreq0Accessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using ReverseBeepFreq1ChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_REVERSEBEEPFREQ1>,
|
||||
ReverseBeepFreq1Accessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using ReverseBeepDuration0ChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_REVERSEBEEPDURATION0>,
|
||||
ReverseBeepDuration0Accessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using ReverseBeepDuration1ChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_REVERSEBEEPDURATION1>,
|
||||
ReverseBeepDuration1Accessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<BuzzerMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -97,16 +98,16 @@ using namespace espgui;
|
||||
|
||||
BuzzerMenu::BuzzerMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTFREQ>, SwitchScreenAction<FrontFreqChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTPATTERN>, SwitchScreenAction<FrontPatternChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKFREQ>, SwitchScreenAction<BackFreqChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKPATTERN>, SwitchScreenAction<BackPatternChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTFREQ>, PushScreenAction<FrontFreqChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTPATTERN>, PushScreenAction<FrontPatternChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKFREQ>, PushScreenAction<BackFreqChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKPATTERN>, PushScreenAction<BackPatternChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEP>, BobbyCheckbox, ReverseBeepAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPFREQ0>, SwitchScreenAction<ReverseBeepFreq0ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPFREQ1>, SwitchScreenAction<ReverseBeepFreq1ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPDURATION0>, SwitchScreenAction<ReverseBeepDuration0ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPDURATION1>, SwitchScreenAction<ReverseBeepDuration1ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPFREQ0>, PushScreenAction<ReverseBeepFreq0ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPFREQ1>, PushScreenAction<ReverseBeepFreq1ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPDURATION0>, PushScreenAction<ReverseBeepDuration0ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REVERSEBEEPDURATION1>, PushScreenAction<ReverseBeepDuration1ChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string BuzzerMenu::text() const
|
||||
@ -116,5 +117,5 @@ std::string BuzzerMenu::text() const
|
||||
|
||||
void BuzzerMenu::back()
|
||||
{
|
||||
switchScreen<SettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -10,14 +10,13 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/debugmenu.h"
|
||||
#include "bobbyerrorhandler.h"
|
||||
|
||||
namespace {
|
||||
@ -256,7 +255,7 @@ CanDebugMenu::CanDebugMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TWAI_START>, CanStartAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TWAI_UNINSTALL>, CanUninstallAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TWAI_INSTALL>, CanInstallAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string CanDebugMenu::text() const
|
||||
@ -285,7 +284,7 @@ void CanDebugMenu::update()
|
||||
|
||||
void CanDebugMenu::back()
|
||||
{
|
||||
espgui::switchScreen<DebugMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -2,11 +2,10 @@
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "debugmenu.h"
|
||||
#include "utils.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "debugtexthelpers.h"
|
||||
|
||||
@ -14,7 +13,7 @@ template<const char *Ttext, typename Ttexts>
|
||||
class CommandDebugMenu :
|
||||
public BobbyMenuDisplay,
|
||||
public espgui::StaticText<Ttext>,
|
||||
public espgui::BackActionInterface<espgui::SwitchScreenAction<DebugMenu>>
|
||||
public espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
{
|
||||
public:
|
||||
CommandDebugMenu()
|
||||
@ -24,7 +23,7 @@ public:
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::BuzzerPatternText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::PoweroffText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::LedText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -1,13 +1,12 @@
|
||||
#include "crashmenu.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "actions/assertaction.h"
|
||||
#include "actions/dividebyzeroaction.h"
|
||||
#include "displays/menus/settingsmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_CRASHMENU[] = "Crash Menu";
|
||||
@ -21,7 +20,7 @@ CrashMenu::CrashMenu()
|
||||
using namespace espgui;
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CRASH_ASSERT>, AssertAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CRASH_DIVZERO>, DivideByZeroAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string CrashMenu::text() const
|
||||
@ -31,5 +30,5 @@ std::string CrashMenu::text() const
|
||||
|
||||
void CrashMenu::back()
|
||||
{
|
||||
espgui::switchScreen<SettingsMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
@ -27,7 +28,6 @@
|
||||
#include "displays/menus/feedbackdebugmenu.h"
|
||||
#include "displays/menus/motorfeedbackdebugmenu.h"
|
||||
#include "displays/menus/dynamicdebugmenu.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "displays/menus/batterydebugmenu.h"
|
||||
#include "bobbycheckbox.h"
|
||||
|
||||
@ -62,42 +62,42 @@ constexpr char TEXT_BACK[] = "Back";
|
||||
DebugMenu::DebugMenu()
|
||||
{
|
||||
using namespace espgui;
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TASKMANAGER>, SwitchScreenAction<TaskmanagerMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TASKMANAGER>, PushScreenAction<TaskmanagerMenu>>>();
|
||||
#ifdef FEATURE_CAN
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CANDEBUG>, SwitchScreenAction<CanDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CANDEBUG>, PushScreenAction<CanDebugMenu>>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_QRCODE_DEBUG>, SwitchScreenAction<QrCodeDebugDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERYDEBUG>, SwitchScreenAction<BatteryDebugMenu>, StaticMenuItemIcon<&bobbyicons::battery>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_QRCODE_DEBUG>, PushScreenAction<QrCodeDebugDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERYDEBUG>, PushScreenAction<BatteryDebugMenu>, StaticMenuItemIcon<&bobbyicons::battery>>>();
|
||||
if (configs.feature.udpcloud.isEnabled.value)
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TOGGLECLOUDDEBUG>, BobbyCheckbox, CloudDebugEnableAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TOGGLECLOUDDEBUG>, BobbyCheckbox, CloudDebugEnableAccessor>>();
|
||||
}
|
||||
constructMenuItem<makeComponent<MenuItem, LastRebootReasonText, StaticFont<2>, DisabledColor, DummyAction>>();
|
||||
#ifdef FEATURE_CAN
|
||||
constructMenuItem<makeComponent<MenuItem, CanIcCrashText, StaticFont<2>, DisabledColor, DummyAction>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTCOMMAND>, SwitchScreenAction<FrontCommandDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKCOMMAND>, SwitchScreenAction<BackCommandDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTCOMMAND>, PushScreenAction<FrontCommandDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKCOMMAND>, PushScreenAction<BackCommandDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTLEFTCOMMAND>, SwitchScreenAction<FrontLeftMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTRIGHTCOMMAND>, SwitchScreenAction<FrontRightMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKLEFTCOMMAND>, SwitchScreenAction<BackLeftMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKRIGHTCOMMAND>, SwitchScreenAction<BackRightMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTLEFTCOMMAND>, PushScreenAction<FrontLeftMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTRIGHTCOMMAND>, PushScreenAction<FrontRightMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKLEFTCOMMAND>, PushScreenAction<BackLeftMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKRIGHTCOMMAND>, PushScreenAction<BackRightMotorStateDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTFEEDBACK>, SwitchScreenAction<FrontFeedbackDebugMenu>, FrontFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKFEEDBACK>, SwitchScreenAction<BackFeedbackDebugMenu>, BackFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTFEEDBACK>, PushScreenAction<FrontFeedbackDebugMenu>, FrontFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKFEEDBACK>, PushScreenAction<BackFeedbackDebugMenu>, BackFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTLEFTFEEDBACK>, SwitchScreenAction<FrontLeftMotorFeedbackDebugMenu>, FrontFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTRIGHTFEEDBACK>, SwitchScreenAction<FrontRightMotorFeedbackDebugMenu>, FrontFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKLEFTFEEDBACK>, SwitchScreenAction<BackLeftMotorFeedbackDebugMenu>, BackFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKRIGHTFEEDBACK>, SwitchScreenAction<BackRightMotorFeedbackDebugMenu>, BackFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTLEFTFEEDBACK>, PushScreenAction<FrontLeftMotorFeedbackDebugMenu>, FrontFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTRIGHTFEEDBACK>, PushScreenAction<FrontRightMotorFeedbackDebugMenu>, FrontFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKLEFTFEEDBACK>, PushScreenAction<BackLeftMotorFeedbackDebugMenu>, BackFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKRIGHTFEEDBACK>, PushScreenAction<BackRightMotorFeedbackDebugMenu>, BackFeedbackColor<TFT_WHITE>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOADSETTINGS>, LoadSettingsAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SAVESETTINGS>, SaveSettingsAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ERASENVS>, EraseNvsAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DYNAMICMENU>, SwitchScreenAction<DynamicDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DYNAMICMENU>, PushScreenAction<DynamicDebugMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string DebugMenu::text() const
|
||||
@ -107,5 +107,5 @@ std::string DebugMenu::text() const
|
||||
|
||||
void DebugMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <changevaluedisplay.h>
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <textwithvaluehelper.h>
|
||||
@ -14,7 +15,6 @@
|
||||
#include "changevaluedisplay_unifiedmodelmode.h"
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "displays/menus/handbremssettingsmenu.h"
|
||||
#include "displays/menus/modessettingsmenu.h"
|
||||
#include "bobbycheckbox.h"
|
||||
|
||||
namespace {
|
||||
@ -49,71 +49,71 @@ using DefaultModeModelModeChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<UnifiedModelMode>,
|
||||
espgui::StaticText<TEXT_MODELMODE>,
|
||||
DefaultModeModelModeAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeSmoothingChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SMOOTHINGVAL>,
|
||||
DefaultModeSmoothingAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeFwSmoothingLowerLimitChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_FWSMOOTHING_LIMIT>,
|
||||
DefaultModeEnableFieldWeakSmoothingLowerLimitAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeFrontPercentageChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_FRONTPERCENTAGE>,
|
||||
DefaultModeFrontPercentageAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeBackPercentageChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_BACKPERCENTAGE>,
|
||||
DefaultModeBackPercentageAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeAddSchwelleChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_ADDSCHWELLE>,
|
||||
DefaultModeAddSchwelleAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeGas1WertChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_ADDGASVAL>,
|
||||
DefaultModeGas1WertAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeGas2WertChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SUBGASVAL>,
|
||||
DefaultModeGas2WertAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeBrems1WertChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_ADDBRAKEVAL>,
|
||||
DefaultModeBrems1WertAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using DefaultModeBrems2WertChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SUBBRAKEVAL>,
|
||||
DefaultModeBrems2WertAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DefaultModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -121,24 +121,24 @@ using namespace espgui;
|
||||
|
||||
DefaultModeSettingsMenu::DefaultModeSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODELMODE>, SwitchScreenAction<DefaultModeModelModeChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODELMODE>, PushScreenAction<DefaultModeModelModeChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SQUAREGAS>, BobbyCheckbox, DefaultModeSquareGasAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SQUAREBREMS>, BobbyCheckbox, DefaultModeSquareBremsAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLESMOOTHINGUP>, BobbyCheckbox, DefaultModeEnableSmoothingUpAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLESMOOTHINGDOWN>, BobbyCheckbox, DefaultModeEnableSmoothingDownAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLEFWSMOOTHINGUP>, BobbyCheckbox, DefaultModeEnableFieldWeakSmoothingUpAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLEFWSMOOTHINGDOWN>, BobbyCheckbox, DefaultModeEnableFieldWeakSmoothingDownAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_HANDBREMSE>, SwitchScreenAction<HandbremsSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_FWSMOOTHING_LIMIT, DefaultModeEnableFieldWeakSmoothingLowerLimitAccessor>, SwitchScreenAction<DefaultModeFwSmoothingLowerLimitChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SMOOTHINGVAL, DefaultModeSmoothingAccessor>, SwitchScreenAction<DefaultModeSmoothingChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_FRONTPERCENTAGE, DefaultModeFrontPercentageAccessor>, SwitchScreenAction<DefaultModeFrontPercentageChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BACKPERCENTAGE, DefaultModeBackPercentageAccessor>, SwitchScreenAction<DefaultModeBackPercentageChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_ADDSCHWELLE, DefaultModeAddSchwelleAccessor>, SwitchScreenAction<DefaultModeAddSchwelleChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SUBGASVAL, DefaultModeGas2WertAccessor>, SwitchScreenAction<DefaultModeGas2WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SUBBRAKEVAL, DefaultModeBrems2WertAccessor>, SwitchScreenAction<DefaultModeBrems2WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_ADDGASVAL, DefaultModeGas1WertAccessor>, SwitchScreenAction<DefaultModeGas1WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_ADDBRAKEVAL, DefaultModeBrems1WertAccessor>, SwitchScreenAction<DefaultModeBrems1WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<ModesSettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_HANDBREMSE>, PushScreenAction<HandbremsSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_FWSMOOTHING_LIMIT, DefaultModeEnableFieldWeakSmoothingLowerLimitAccessor>, PushScreenAction<DefaultModeFwSmoothingLowerLimitChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SMOOTHINGVAL, DefaultModeSmoothingAccessor>, PushScreenAction<DefaultModeSmoothingChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_FRONTPERCENTAGE, DefaultModeFrontPercentageAccessor>, PushScreenAction<DefaultModeFrontPercentageChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BACKPERCENTAGE, DefaultModeBackPercentageAccessor>, PushScreenAction<DefaultModeBackPercentageChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_ADDSCHWELLE, DefaultModeAddSchwelleAccessor>, PushScreenAction<DefaultModeAddSchwelleChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SUBGASVAL, DefaultModeGas2WertAccessor>, PushScreenAction<DefaultModeGas2WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SUBBRAKEVAL, DefaultModeBrems2WertAccessor>, PushScreenAction<DefaultModeBrems2WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_ADDGASVAL, DefaultModeGas1WertAccessor>, PushScreenAction<DefaultModeGas1WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_ADDBRAKEVAL, DefaultModeBrems1WertAccessor>, PushScreenAction<DefaultModeBrems1WertChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string DefaultModeSettingsMenu::text() const
|
||||
@ -148,5 +148,5 @@ std::string DefaultModeSettingsMenu::text() const
|
||||
|
||||
void DefaultModeSettingsMenu::back()
|
||||
{
|
||||
switchScreen<ModesSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "menuitem.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "displays/starfielddisplay.h"
|
||||
#include "displays/pingpongdisplay.h"
|
||||
#include "displays/spirodisplay.h"
|
||||
#include "displays/gameoflifedisplay.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
@ -25,11 +25,11 @@ constexpr char TEXT_BACK[] = "Back";
|
||||
DemosMenu::DemosMenu()
|
||||
{
|
||||
using namespace espgui;
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STARFIELD>, SwitchScreenAction<StarfieldDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PINGPONG>, SwitchScreenAction<PingPongDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SPIRO>, SwitchScreenAction<SpiroDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMEOFLIFE>, SwitchScreenAction<GameOfLifeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STARFIELD>, PushScreenAction<StarfieldDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PINGPONG>, PushScreenAction<PingPongDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SPIRO>, PushScreenAction<SpiroDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMEOFLIFE>, PushScreenAction<GameOfLifeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string DemosMenu::text() const
|
||||
@ -39,5 +39,5 @@ std::string DemosMenu::text() const
|
||||
|
||||
void DemosMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <icons/back.h>
|
||||
#include <changevaluedisplay.h>
|
||||
#include <changevaluedisplay_bool.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbychangevaluedisplay.h"
|
||||
@ -90,8 +92,8 @@ using ToggleChangeValueDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<bool>,
|
||||
espgui::StaticText<TEXT_DEBUGTOGGLEMENU>,
|
||||
ToggleAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<DynamicDebugMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<DynamicDebugMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
class OpenPopupAction : public virtual espgui::ActionInterface
|
||||
@ -135,7 +137,7 @@ DynamicDebugMenu::DynamicDebugMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATICICON>, StaticMenuItemIcon<&bobbyicons::lock>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOCKTOGGLE>, BobbyCheckbox, ToggleLockedAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEBUGTOGGLE>, BobbyCheckbox, ToggleAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEBUGTOGGLEMENU>, SwitchScreenAction<ToggleChangeValueDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEBUGTOGGLEMENU>, PushScreenAction<ToggleChangeValueDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, RandomText, RandomColor, RandomFont, RandomIcon, DummyAction>>();
|
||||
|
||||
// more scrolling
|
||||
@ -146,7 +148,12 @@ DynamicDebugMenu::DynamicDebugMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DUMMYITEM>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DUMMYITEM>, DummyAction>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
void DynamicDebugMenu::back()
|
||||
{
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -3,11 +3,9 @@
|
||||
// 3rdparty lib includes
|
||||
#include <textinterface.h>
|
||||
#include <espchrono.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "debugmenu.h"
|
||||
|
||||
class RandomText : public virtual espgui::TextInterface
|
||||
{
|
||||
@ -21,9 +19,10 @@ private:
|
||||
|
||||
class DynamicDebugMenu :
|
||||
public BobbyMenuDisplay,
|
||||
public RandomText,
|
||||
public espgui::BackActionInterface<espgui::SwitchScreenAction<DebugMenu>>
|
||||
public RandomText
|
||||
{
|
||||
public:
|
||||
DynamicDebugMenu();
|
||||
|
||||
void back() override;
|
||||
};
|
||||
|
@ -2,11 +2,10 @@
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "debugmenu.h"
|
||||
#include "utils.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "debugtexthelpers.h"
|
||||
#include "debugcolorhelpers.h"
|
||||
@ -16,7 +15,7 @@ template<const char *Ttext, typename Ttexts, template<int> class ColorInterface>
|
||||
class FeedbackDebugMenu :
|
||||
public BobbyMenuDisplay,
|
||||
public espgui::StaticText<Ttext>,
|
||||
public espgui::BackActionInterface<espgui::SwitchScreenAction<DebugMenu>>
|
||||
public espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
{
|
||||
public:
|
||||
FeedbackDebugMenu()
|
||||
@ -27,7 +26,7 @@ public:
|
||||
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::BoardTempText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::BoardTempFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::TimeoutCntSerialText, StaticFont<2>, ColorInterface<TFT_DARKGREY>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "utils.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
namespace {
|
||||
@ -16,7 +16,7 @@ class ContainerModeSettingsMenu :
|
||||
public:
|
||||
ContainerModeSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<ModesSettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string text() const override
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "garagenmenu.h"
|
||||
#include "garagemenu.h"
|
||||
|
||||
// 3rd party libs
|
||||
#include <icons/back.h>
|
||||
@ -8,8 +8,7 @@
|
||||
#include <menuitem.h>
|
||||
|
||||
// local includes
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "espnowfunctions.h"
|
||||
#include "globals.h"
|
||||
#include "newsettings.h"
|
||||
@ -42,7 +41,7 @@ GarageMenu::GarageMenu()
|
||||
menuitem.setTitle(wirelessDoor.doorId.value);
|
||||
}
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string GarageMenu::text() const
|
||||
@ -52,7 +51,7 @@ std::string GarageMenu::text() const
|
||||
|
||||
void GarageMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
@ -1,7 +1,8 @@
|
||||
#include "graphsmenu.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "graphdisplay.h"
|
||||
#include "splitgraphdisplay.h"
|
||||
@ -11,7 +12,6 @@
|
||||
#include "displays/bobbysplitgraphdisplay.h"
|
||||
#include "utils.h"
|
||||
#include "statistics.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_GRAPHS[] = "Graphs";
|
||||
@ -36,83 +36,83 @@ using GasGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_GAS>,
|
||||
espgui::SingleGraphAccessor<GasStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using BremsGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_BREMS>,
|
||||
espgui::SingleGraphAccessor<BremsStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using PotisGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<2>,
|
||||
espgui::StaticText<TEXT_POTIS>,
|
||||
espgui::DualGraphAccessor<GasStatistics, BremsStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using PotisSplitGraphDisplay = espgui::makeComponent<
|
||||
BobbySplitGraphDisplay<1, 1>,
|
||||
espgui::StaticText<TEXT_POTIS>,
|
||||
espgui::SingleTopGraphAccessor<GasStatistics>,
|
||||
espgui::SingleBottomGraphAccessor<BremsStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using AvgSpeedGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_AVGSPEED>,
|
||||
espgui::SingleGraphAccessor<AvgSpeedStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using AvgSpeedKmhGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_AVGSPEEDKMH>,
|
||||
espgui::SingleGraphAccessor<AvgSpeedKmhStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using SumCurrentGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_SUMCURRENT>,
|
||||
espgui::SingleGraphAccessor<SumCurrentStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using FrontVoltageGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_FRONTVOLTAGE>,
|
||||
espgui::SingleGraphAccessor<FrontVoltageStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using BackVoltageGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_BACKVOLTAGE>,
|
||||
espgui::SingleGraphAccessor<BackVoltageStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using VoltagesGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<2>,
|
||||
espgui::StaticText<TEXT_VOLTAGES>,
|
||||
espgui::DualGraphAccessor<FrontVoltageStatistics, BackVoltageStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using VoltagesSplitGraphDisplay = espgui::makeComponent<
|
||||
BobbySplitGraphDisplay<1, 1>,
|
||||
espgui::StaticText<TEXT_VOLTAGES>,
|
||||
espgui::SingleTopGraphAccessor<FrontVoltageStatistics>,
|
||||
espgui::SingleBottomGraphAccessor<BackVoltageStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
#ifdef FEATURE_BMS
|
||||
@ -120,29 +120,29 @@ using BmsVoltageGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_BMSVOLTAGE>,
|
||||
espgui::SingleGraphAccessor<BmsVoltageStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using BmsCurrentGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_BMSCURRENT>,
|
||||
espgui::SingleGraphAccessor<BmsCurrentStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using BmsPowerGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_BMSPOWER>,
|
||||
espgui::SingleGraphAccessor<BmsPowerStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using SumCurrentsComparisonGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<2>,
|
||||
espgui::StaticText<TEXT_SUMCURRENTSCOMPARISON>,
|
||||
DualGraphAccessor<SumCurrentStatistics, BmsCurrentStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
#endif
|
||||
|
||||
@ -157,42 +157,42 @@ using MotorCurrentsGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<4>,
|
||||
espgui::StaticText<TEXT_MOTORCURRENTS>,
|
||||
MotorCurrentsStatistics,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using RssiGraphDisplay = espgui::makeComponent<
|
||||
BobbyGraphDisplay<1>,
|
||||
espgui::StaticText<TEXT_RSSI>,
|
||||
espgui::SingleGraphAccessor<RssiStatistics>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<GraphsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<GraphsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
GraphsMenu::GraphsMenu()
|
||||
{
|
||||
using namespace espgui;
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAS>, SwitchScreenAction<GasGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BREMS>, SwitchScreenAction<BremsGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POTIS>, SwitchScreenAction<PotisGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POTIS>, SwitchScreenAction<PotisSplitGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_AVGSPEED>, SwitchScreenAction<AvgSpeedGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_AVGSPEEDKMH>, SwitchScreenAction<AvgSpeedKmhGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SUMCURRENT>, SwitchScreenAction<SumCurrentGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTVOLTAGE>, SwitchScreenAction<FrontVoltageGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKVOLTAGE>, SwitchScreenAction<BackVoltageGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_VOLTAGES>, SwitchScreenAction<VoltagesGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_VOLTAGES>, SwitchScreenAction<VoltagesSplitGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAS>, PushScreenAction<GasGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BREMS>, PushScreenAction<BremsGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POTIS>, PushScreenAction<PotisGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POTIS>, PushScreenAction<PotisSplitGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_AVGSPEED>, PushScreenAction<AvgSpeedGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_AVGSPEEDKMH>, PushScreenAction<AvgSpeedKmhGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SUMCURRENT>, PushScreenAction<SumCurrentGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTVOLTAGE>, PushScreenAction<FrontVoltageGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKVOLTAGE>, PushScreenAction<BackVoltageGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_VOLTAGES>, PushScreenAction<VoltagesGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_VOLTAGES>, PushScreenAction<VoltagesSplitGraphDisplay>>>();
|
||||
#ifdef FEATURE_BMS
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMSVOLTAGE>, SwitchScreenAction<BmsVoltageGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMSCURRENT>, SwitchScreenAction<BmsCurrentGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMSPOWER>, SwitchScreenAction<BmsPowerGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SUMCURRENTSCOMPARISON>, SwitchScreenAction<SumCurrentsComparisonGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMSVOLTAGE>, PushScreenAction<BmsVoltageGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMSCURRENT>, PushScreenAction<BmsCurrentGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMSPOWER>, PushScreenAction<BmsPowerGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SUMCURRENTSCOMPARISON>, PushScreenAction<SumCurrentsComparisonGraphDisplay>>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORCURRENTS>, SwitchScreenAction<MotorCurrentsGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_RSSI>, SwitchScreenAction<RssiGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORCURRENTS>, PushScreenAction<MotorCurrentsGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_RSSI>, PushScreenAction<RssiGraphDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string GraphsMenu::text() const
|
||||
@ -202,5 +202,5 @@ std::string GraphsMenu::text() const
|
||||
|
||||
void GraphsMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <fmt/core.h>
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "actions/qraction.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "displays/qrdisplay.h"
|
||||
#include "displays/qrimportdisplay.h"
|
||||
#include "qrimport.h"
|
||||
@ -49,11 +49,11 @@ public:
|
||||
if (deleteMode)
|
||||
{
|
||||
qrimport::delete_qr_code(m_qrmenu.text);
|
||||
espgui::switchScreen<GreenPassMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
else
|
||||
{
|
||||
espgui::switchScreen<QrDisplay<GreenPassMenu>>(m_qrmenu.message);
|
||||
espgui::pushScreen<QrDisplay<GreenPassMenu>>(m_qrmenu.message);
|
||||
}
|
||||
}
|
||||
private:
|
||||
@ -87,8 +87,9 @@ GreenPassMenu::GreenPassMenu()
|
||||
constructMenuItem<makeComponentArgs<MenuItem, SwitchQrImportDisplayAction<GreenPassMenu>, StaticText<TEXT_ADDCERT>>>(std::move(nvs_key));
|
||||
}
|
||||
}
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DELCERT>, BobbyCheckbox, DeleteModeAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string GreenPassMenu::text() const
|
||||
@ -98,5 +99,5 @@ std::string GreenPassMenu::text() const
|
||||
|
||||
void GreenPassMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ HandbremsSettingsMenu::HandbremsSettingsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_HANDBREMSE_ENABLE>, BobbyCheckbox, HandbremsEnabledAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_HANDBREMSE_AUTOMATIC>, BobbyCheckbox, HandbremsAutomaticAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_HANDBREMSE_VISUALIZE>, BobbyCheckbox, HandbremsVisualizeAccessor>>();
|
||||
constructMenuItem<SwitchScreenTypeSafeChangeMenuItem<HandbremseMode, HandbremsSettingsMenu, TEXT_HANDBREMSE_MODE>>(&configs.handbremse.mode);
|
||||
constructMenuItem<PushScreenTypeSafeChangeMenuItem<HandbremseMode, TEXT_HANDBREMSE_MODE>>(&configs.handbremse.mode);
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_HANDBREMSE_TRIGGERTIMEOUT, HandbremsTimeoutAccessor>, SwitchScreenAction<HandBremsTriggerTimeoutChangeValueDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DefaultModeSettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include "changevaluedisplay.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
@ -12,7 +13,6 @@
|
||||
#include "changevaluedisplay_larsmmode_mode.h"
|
||||
#include "changevaluedisplay_unifiedmodelmode.h"
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "displays/menus/modessettingsmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_LARSMMODESETTINGS[] = "Larsm mode settings";
|
||||
@ -25,22 +25,22 @@ using LarsmModeModelModeChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<UnifiedModelMode>,
|
||||
espgui::StaticText<TEXT_MODELMODE>,
|
||||
LarsmModeModelModeAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LarsmModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LarsmModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using LarsmModeModeChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<LarsmModeMode>,
|
||||
espgui::StaticText<TEXT_SETMODE>,
|
||||
LarsmModeModeAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LarsmModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LarsmModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using LarsmModeIterationsChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_SETITERATIONS>,
|
||||
LarsmModeIterationsAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LarsmModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LarsmModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -48,10 +48,10 @@ using namespace espgui;
|
||||
|
||||
LarsmModeSettingsMenu::LarsmModeSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODELMODE>, SwitchScreenAction<LarsmModeModelModeChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETMODE>, SwitchScreenAction<LarsmModeModeChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETITERATIONS>, SwitchScreenAction<LarsmModeIterationsChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<ModesSettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODELMODE>, PushScreenAction<LarsmModeModelModeChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETMODE>, PushScreenAction<LarsmModeModeChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETITERATIONS>, PushScreenAction<LarsmModeIterationsChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string LarsmModeSettingsMenu::text() const
|
||||
@ -61,5 +61,5 @@ std::string LarsmModeSettingsMenu::text() const
|
||||
|
||||
void LarsmModeSettingsMenu::back()
|
||||
{
|
||||
switchScreen<ModesSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <FastLED.h>
|
||||
#include <actioninterface.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <changevaluedisplay.h>
|
||||
#include <icons/back.h>
|
||||
#include <menuitem.h>
|
||||
@ -53,32 +54,32 @@ using LedsCountChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_LEDSCOUNT>,
|
||||
LedsCountAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using CenterOffsetChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_CENTEROFFSET>,
|
||||
CenterOffsetAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using SmallOffsetChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_SMALLOFFSET>,
|
||||
SmallOffsetAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using BigOffsetChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_BIGOFFSET>,
|
||||
BigOffsetAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using LedStripMaxAmpereChangeScreen = espgui::makeComponent<
|
||||
@ -86,40 +87,40 @@ using LedStripMaxAmpereChangeScreen = espgui::makeComponent<
|
||||
espgui::StaticText<TEXT_LEDSTRIPCURRENTLIMIT>,
|
||||
LedStripMaxAmpereAccessor,
|
||||
espgui::RatioNumberStep<float, std::ratio<1,10>>,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using StVOOffsetChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_STVO_FRONTOFFSET>,
|
||||
LedsStVOFrontOffsetAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using StVOLengthChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_STVO_FRONTLENGTH>,
|
||||
LedsStVOFrontLengthAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using AnimationMultiplierChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_ANIMATION_MULTIPLIER>,
|
||||
AnimationMultiplierAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using LedStripBrightnessChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_LEDSTRIP_BRIGHTNESS>,
|
||||
LedstripBrightnessAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LedstripMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LedstripMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
class AllCustomLedsOffAction : public virtual espgui::ActionInterface
|
||||
@ -154,30 +155,31 @@ LedstripMenu::LedstripMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_AUTOMATIC_LIGHTS>, BobbyCheckbox, LedstripAutomaticLightAccessor>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDANIMATION>, BobbyCheckbox, EnableLedAnimationAccessor>>();
|
||||
constructMenuItem<SwitchScreenTypeSafeChangeMenuItem<LedstripAnimation, LedstripMenu, TEXT_SELECTANIMATION>>(&configs.ledstrip.animationType);
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BRAKELIGHTS>, BobbyCheckbox, EnableBrakeLightsAccessor>>();
|
||||
constructMenuItem<PushScreenTypeSafeChangeMenuItem<LedstripAnimation, TEXT_SELECTANIMATION>>(&configs.ledstrip.animationType);
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIPCOLORMENU>, espgui::SwitchScreenAction<LedstripColorsDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BRAKELIGHTS>, BobbyCheckbox, EnableBrakeLightsAccessor>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIPCOLORMENU>, espgui::PushScreenAction<LedstripColorsDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIP_ALLCUSTOMOFF>, AllCustomLedsOffAction>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BLINKBEEP>, BobbyCheckbox, EnableBeepWhenBlinkAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_FULLBLINK>, BobbyCheckbox, EnableFullBlinkAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BLINKBEEP>, BobbyCheckbox, EnableBeepWhenBlinkAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_FULLBLINK>, BobbyCheckbox, EnableFullBlinkAccessor>>();
|
||||
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_STVO_FRONTOFFSET, LedsStVOFrontOffsetAccessor>, espgui::SwitchScreenAction<StVOOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_STVO_FRONTLENGTH, LedsStVOFrontLengthAccessor>, espgui::SwitchScreenAction<StVOLengthChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_STVO_FRONTOFFSET, LedsStVOFrontOffsetAccessor>, espgui::PushScreenAction<StVOOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_STVO_FRONTLENGTH, LedsStVOFrontLengthAccessor>, espgui::PushScreenAction<StVOLengthChangeScreen>>>(); }
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BLINKANIMATION>, espgui::SwitchScreenAction<LedstripSelectBlinkMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BLINKANIMATION>, espgui::PushScreenAction<LedstripSelectBlinkMenu>>>();
|
||||
if (configs.feature.ota.isEnabled.value)
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIP_CHANGE_OTA_ANIM>, espgui::SwitchScreenAction<LedstripOtaAnimationChangeMenu>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_ANIMATION_MULTIPLIER>, espgui::SwitchScreenAction<AnimationMultiplierChangeScreen>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_LEDSCOUNT, LedsCountAccessor>, espgui::SwitchScreenAction<LedsCountChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CENTEROFFSET, CenterOffsetAccessor>, espgui::SwitchScreenAction<CenterOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SMALLOFFSET, SmallOffsetAccessor>, espgui::SwitchScreenAction<SmallOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BIGOFFSET, BigOffsetAccessor>, espgui::SwitchScreenAction<BigOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIP_BRIGHTNESS>, espgui::SwitchScreenAction<LedStripBrightnessChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, LedStripMaxCurrentText, espgui::SwitchScreenAction<LedStripMaxAmpereChangeScreen>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BACK>, espgui::SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIP_CHANGE_OTA_ANIM>, espgui::PushScreenAction<LedstripOtaAnimationChangeMenu>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_ANIMATION_MULTIPLIER>, espgui::PushScreenAction<AnimationMultiplierChangeScreen>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_LEDSCOUNT, LedsCountAccessor>, espgui::PushScreenAction<LedsCountChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CENTEROFFSET, CenterOffsetAccessor>, espgui::PushScreenAction<CenterOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SMALLOFFSET, SmallOffsetAccessor>, espgui::PushScreenAction<SmallOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_BIGOFFSET, BigOffsetAccessor>, espgui::PushScreenAction<BigOffsetChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_LEDSTRIP_BRIGHTNESS>, espgui::PushScreenAction<LedStripBrightnessChangeScreen>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, LedStripMaxCurrentText, espgui::PushScreenAction<LedStripMaxAmpereChangeScreen>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BACK>, espgui::PushScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string LedstripMenu::text() const
|
||||
@ -187,5 +189,5 @@ std::string LedstripMenu::text() const
|
||||
|
||||
void LedstripMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
72
main/displays/menus/ledstripselectanimationmenu.cpp
Normal file
72
main/displays/menus/ledstripselectanimationmenu.cpp
Normal file
@ -0,0 +1,72 @@
|
||||
#include "ledstripselectanimationmenu.h"
|
||||
|
||||
// Local includes
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/ledstripanimationactions.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "ledstripdefines.h"
|
||||
#include "ledstripmenu.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
namespace {
|
||||
constexpr char TEXT_SELECTANIMATION[] = "Select Animation";
|
||||
constexpr char TEXT_ANIMATION_DEFAULTRAINBOW[] = "Default Rainbow";
|
||||
constexpr char TEXT_ANIMATION_BETTERRAINBOW[] = "Better Rainbow";
|
||||
constexpr char TEXT_ANIMATION_SPEEDSYNCANIMATION[] = "Speed Sync";
|
||||
constexpr char TEXT_ANIMATION_CUSTOMCOLOR[] = "Custom Color";
|
||||
constexpr char TEXT_BACK[] = "Back";
|
||||
|
||||
class CurrentSelectedAnimationText : public virtual espgui::TextInterface
|
||||
{
|
||||
public:
|
||||
std::string text() const override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
LedstripSelectAnimationMenu::LedstripSelectAnimationMenu()
|
||||
{
|
||||
using namespace espgui;
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, CurrentSelectedAnimationText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ANIMATION_DEFAULTRAINBOW>, LedStripSetAnimationAction<LedstripAnimation::DefaultRainbow>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ANIMATION_BETTERRAINBOW>, LedStripSetAnimationAction<LedstripAnimation::BetterRainbow>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ANIMATION_SPEEDSYNCANIMATION>, LedStripSetAnimationAction<LedstripAnimation::SpeedSync>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ANIMATION_CUSTOMCOLOR>, LedStripSetAnimationAction<LedstripAnimation::CustomColor>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string LedstripSelectAnimationMenu::text() const
|
||||
{
|
||||
return TEXT_SELECTANIMATION;
|
||||
}
|
||||
|
||||
void LedstripSelectAnimationMenu::back()
|
||||
{
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
std::string CurrentSelectedAnimationText::text() const
|
||||
{
|
||||
switch (configs.ledstrip.animationType.value)
|
||||
{
|
||||
case LedstripAnimation::DefaultRainbow:
|
||||
return TEXT_ANIMATION_DEFAULTRAINBOW;
|
||||
case LedstripAnimation::BetterRainbow:
|
||||
return TEXT_ANIMATION_BETTERRAINBOW;
|
||||
case LedstripAnimation::SpeedSync:
|
||||
return TEXT_ANIMATION_SPEEDSYNCANIMATION;
|
||||
case LedstripAnimation::CustomColor:
|
||||
return TEXT_ANIMATION_CUSTOMCOLOR;
|
||||
default:
|
||||
return "Animation Unkown";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
#endif
|
@ -2,13 +2,12 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "actions/ledstripblinkactions.h"
|
||||
#include "displays/menus/ledstripmenu.h"
|
||||
#include "ledstrip.h"
|
||||
#include "ledstripdefines.h"
|
||||
#include "bobbycheckbox.h"
|
||||
@ -42,7 +41,7 @@ LedstripSelectBlinkMenu::LedstripSelectBlinkMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ANIMATION_BLINKBOTH>, LedstripAnimationBlinkBothAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LEDSTRIP_EN_BLINK_ANIM>, BobbyCheckbox, LedstripEnableBlinkAnimationAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LEDSTRIP_VISUALIZE_BLINK>, BobbyCheckbox, LedstripEnableVisualizeBlinkAnimationAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<LedstripMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string LedstripSelectBlinkMenu::text() const
|
||||
@ -52,7 +51,7 @@ std::string LedstripSelectBlinkMenu::text() const
|
||||
|
||||
void LedstripSelectBlinkMenu::back()
|
||||
{
|
||||
espgui::switchScreen<LedstripMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "ledstripselectotamode.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "ledstrip.h"
|
||||
#include "newsettings.h"
|
||||
#include "utils.h"
|
||||
#include "ledstripmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_BLINKANIMATION[] = "Blink animation";
|
||||
@ -34,7 +34,7 @@ LedstripOtaAnimationChangeMenu::LedstripOtaAnimationChangeMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_OTAANIM_NONE>, LedstripChangeOtaAnimModeAction<OtaAnimationModes::None>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_OTAANIM_PROGRESS>, LedstripChangeOtaAnimModeAction<OtaAnimationModes::GreenProgressBar>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_OTAANIM_COLOR>, LedstripChangeOtaAnimModeAction<OtaAnimationModes::ColorChangeAll>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<LedstripMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string LedstripOtaAnimationChangeMenu::text() const
|
||||
@ -44,5 +44,5 @@ std::string LedstripOtaAnimationChangeMenu::text() const
|
||||
|
||||
void LedstripOtaAnimationChangeMenu::back()
|
||||
{
|
||||
espgui::switchScreen<LedstripMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <changevaluedisplay.h>
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <textwithvaluehelper.h>
|
||||
|
||||
@ -11,7 +12,6 @@
|
||||
#include "displays/bobbychangevaluedisplay.h"
|
||||
#include "utils.h"
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "displays/menus/settingsmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_LIMITSSETTINGS[] = "Limit settings";
|
||||
@ -27,43 +27,43 @@ using IMotMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_IMOTMAX>,
|
||||
IMotMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using IDcMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_IDCMAX>,
|
||||
IDcMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using NMotMaxKmhChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_NMOTMAXKMH>,
|
||||
NMotMaxKmhAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using NMotMaxRpmChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_NMOTMAX>,
|
||||
NMotMaxRpmAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using FieldWeakMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_FIELDWEAKMAX>,
|
||||
FieldWeakMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
using PhaseAdvMaxChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_PHASEADVMAX>,
|
||||
PhaseAdvMaxAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<LimitsSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -71,13 +71,13 @@ using namespace espgui;
|
||||
|
||||
LimitsSettingsMenu::LimitsSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_IMOTMAX, IMotMaxAccessor>, SwitchScreenAction<IMotMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_IDCMAX, IDcMaxAccessor>, SwitchScreenAction<IDcMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NMOTMAXKMH, NMotMaxKmhAccessor>, SwitchScreenAction<NMotMaxKmhChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NMOTMAX, NMotMaxRpmAccessor>, SwitchScreenAction<NMotMaxRpmChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_FIELDWEAKMAX, FieldWeakMaxAccessor>, SwitchScreenAction<FieldWeakMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_PHASEADVMAX, PhaseAdvMaxAccessor>, SwitchScreenAction<PhaseAdvMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_IMOTMAX, IMotMaxAccessor>, PushScreenAction<IMotMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_IDCMAX, IDcMaxAccessor>, PushScreenAction<IDcMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NMOTMAXKMH, NMotMaxKmhAccessor>, PushScreenAction<NMotMaxKmhChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NMOTMAX, NMotMaxRpmAccessor>, PushScreenAction<NMotMaxRpmChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_FIELDWEAKMAX, FieldWeakMaxAccessor>, PushScreenAction<FieldWeakMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_PHASEADVMAX, PhaseAdvMaxAccessor>, PushScreenAction<PhaseAdvMaxChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string LimitsSettingsMenu::text() const
|
||||
@ -87,5 +87,5 @@ std::string LimitsSettingsMenu::text() const
|
||||
|
||||
void LimitsSettingsMenu::back()
|
||||
{
|
||||
switchScreen<SettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include "mainmenu.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <tftinstance.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/statusdisplay.h"
|
||||
#include "displays/menus/selectmodemenu.h"
|
||||
#include "displays/menus/selectmodemenu.h"
|
||||
#include "displays/menus/ledstripmenu.h"
|
||||
@ -21,7 +22,7 @@
|
||||
#include "displays/menus/demosmenu.h"
|
||||
#include "displays/menus/greenpassmenu.h"
|
||||
#include "displays/lockscreen.h"
|
||||
#include "displays/menus/garagenmenu.h"
|
||||
#include "displays/menus/garagemenu.h"
|
||||
#include "displays/menus/otamenu.h"
|
||||
#include "displays/poweroffdisplay.h"
|
||||
#include "displays/menus/statisticsmenu.h"
|
||||
@ -45,7 +46,7 @@
|
||||
#include "icons/statistics.h"
|
||||
#include "icons/greenpass.h"
|
||||
#include "icons/time.h"
|
||||
#include "tftinstance.h"
|
||||
#include "displays/statusdisplay.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TAG[] = "BOBBY";
|
||||
@ -84,40 +85,40 @@ MainMenu::MainMenu()
|
||||
using namespace espgui;
|
||||
|
||||
// constructMenuItem<makeComponent<MenuItem, mainmenu::CurrentTimeText, DummyAction, StaticMenuItemIcon<&bobbyicons::time>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATUS>, SwitchScreenAction<StatusDisplay>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATUS>, PushScreenAction<StatusDisplay>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
if (configs.feature.ledstrip.isEnabled.value)
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LEDSTRIP>, SwitchScreenAction<LedstripMenu>, StaticMenuItemIcon<&bobbyicons::neopixel>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LEDSTRIP>, PushScreenAction<LedstripMenu>, StaticMenuItemIcon<&bobbyicons::neopixel>>>();
|
||||
}
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATISTICSMENU>, SwitchScreenAction<StatisticsMenu>, StaticMenuItemIcon<&bobbyicons::statistics>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTMODE>, SwitchScreenAction<SelectModeMenu>, StaticMenuItemIcon<&bobbyicons::modes>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATISTICSMENU>, PushScreenAction<StatisticsMenu>, StaticMenuItemIcon<&bobbyicons::statistics>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTMODE>, PushScreenAction<SelectModeMenu>, StaticMenuItemIcon<&bobbyicons::modes>>>();
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODESETTINGS>, ModeSettingsAction>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY>, SwitchScreenAction<BatteryMenu>, StaticMenuItemIcon<&bobbyicons::battery>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETTINGS>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&bobbyicons::settings>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GREENPASS>, SwitchScreenAction<GreenPassMenu>, StaticMenuItemIcon<&bobbyicons::greenpass>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOCKVEHICLE>, SwitchScreenAction<Lockscreen>, StaticMenuItemIcon<&bobbyicons::lock>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY>, PushScreenAction<BatteryMenu>, StaticMenuItemIcon<&bobbyicons::battery>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SETTINGS>, PushScreenAction<SettingsMenu>, StaticMenuItemIcon<&bobbyicons::settings>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GREENPASS>, PushScreenAction<GreenPassMenu>, StaticMenuItemIcon<&bobbyicons::greenpass>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LOCKVEHICLE>, PushScreenAction<Lockscreen>, StaticMenuItemIcon<&bobbyicons::lock>>>();
|
||||
if (configs.feature.garage.isEnabled.value && configs.feature.esp_now.isEnabled.value)
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GARAGE>, SwitchScreenAction<GarageMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GARAGE>, PushScreenAction<GarageMenu>>>();
|
||||
}
|
||||
if (configs.feature.ota.isEnabled.value)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UPDATE>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GRAPHS>, SwitchScreenAction<GraphsMenu>, StaticMenuItemIcon<&bobbyicons::graph>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UPDATE>, PushScreenAction<OtaMenu>, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GRAPHS>, PushScreenAction<GraphsMenu>, StaticMenuItemIcon<&bobbyicons::graph>>>();
|
||||
#if defined(FEATURE_CAN) && defined(FEATURE_POWERSUPPLY)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POWERSUPPLY>, SwitchScreenAction<PowerSupplyDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POWERSUPPLY>, PushScreenAction<PowerSupplyDisplay>>>();
|
||||
#endif
|
||||
#ifdef FEATURE_MOSFETS
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOSFETS>, SwitchScreenAction<MosfetsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOSFETS>, PushScreenAction<MosfetsMenu>>>();
|
||||
#endif
|
||||
#if defined(FEATURE_BLUETOOTH) && defined(FEATURE_BMS)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMS>, SwitchScreenAction<BmsMenu>, StaticMenuItemIcon<&bobbyicons::bms>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BMS>, PushScreenAction<BmsMenu>, StaticMenuItemIcon<&bobbyicons::bms>>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEMOS>, SwitchScreenAction<DemosMenu>, StaticMenuItemIcon<&bobbyicons::demos>>>();
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PROFILES>, SwitchScreenAction<ProfilesMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>(); }
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MANAGEPROFILESMENU>,SwitchScreenAction<ManageProfilesMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>(); }
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEBUG>, SwitchScreenAction<DebugMenu>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POWEROFF>, SwitchScreenAction<PoweroffDisplay>, StaticMenuItemIcon<&bobbyicons::poweroff>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CONFISCATIONMODE>, SwitchScreenAction<ConfiscationDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEMOS>, PushScreenAction<DemosMenu>, StaticMenuItemIcon<&bobbyicons::demos>>>();
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PROFILES>, PushScreenAction<ProfilesMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>(); }
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MANAGEPROFILESMENU>,PushScreenAction<ManageProfilesMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>(); }
|
||||
if (SHOWITEM) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEBUG>, PushScreenAction<DebugMenu>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_POWEROFF>, PushScreenAction<PoweroffDisplay>, StaticMenuItemIcon<&bobbyicons::poweroff>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CONFISCATIONMODE>, PushScreenAction<ConfiscationDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REBOOT>, RebootAction, StaticMenuItemIcon<&bobbyicons::reboot>>>();
|
||||
//#ifdef MAINMENU_PLUGIN
|
||||
// GMEN1
|
||||
@ -131,5 +132,5 @@ std::string MainMenu::text() const
|
||||
|
||||
void MainMenu::back()
|
||||
{
|
||||
espgui::switchScreen<StatusDisplay>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -3,11 +3,10 @@
|
||||
#ifdef FEATURE_MOSFETS
|
||||
// 3rdparty lib includes
|
||||
#include "accessorinterface.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "bobbycheckbox.h"
|
||||
#include "types.h"
|
||||
|
||||
@ -37,7 +36,7 @@ MosfetsMenu::MosfetsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOSFET0>, BobbyCheckbox, Mosfet0Accessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOSFET1>, BobbyCheckbox, Mosfet1Accessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOSFET2>, BobbyCheckbox, Mosfet2Accessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string MosfetsMenu::text() const
|
||||
@ -47,7 +46,7 @@ std::string MosfetsMenu::text() const
|
||||
|
||||
void MosfetsMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -2,11 +2,10 @@
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "debugmenu.h"
|
||||
#include "utils.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "debugtexthelpers.h"
|
||||
#include "debugcolorhelpers.h"
|
||||
@ -15,7 +14,7 @@ template<const char *Ttext, typename Ttexts, template<int> class ColorInterface>
|
||||
class MotorFeedbackDebugMenu :
|
||||
public BobbyMenuDisplay,
|
||||
public espgui::StaticText<Ttext>,
|
||||
public espgui::BackActionInterface<espgui::SwitchScreenAction<DebugMenu>>
|
||||
public espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
{
|
||||
public:
|
||||
MotorFeedbackDebugMenu()
|
||||
@ -36,7 +35,7 @@ public:
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaCFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::ChopsText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::HallText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -3,12 +3,11 @@
|
||||
// 3rdparty lib includes
|
||||
#include "menuitem.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "debugmenu.h"
|
||||
#include "utils.h"
|
||||
#include "debugtexthelpers.h"
|
||||
|
||||
@ -16,7 +15,7 @@ template<const char *Ttext, typename Ttexts>
|
||||
class MotorStateDebugMenu :
|
||||
public BobbyMenuDisplay,
|
||||
public espgui::StaticText<Ttext>,
|
||||
public espgui::BackActionInterface<espgui::SwitchScreenAction<DebugMenu>>
|
||||
public espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
{
|
||||
public:
|
||||
MotorStateDebugMenu()
|
||||
@ -33,7 +32,7 @@ public:
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::PhaseAdvMaxText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::CruiseCtrlEnaText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, typename Ttexts::NCruiseMotTgtText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -3,14 +3,14 @@
|
||||
// 3rdparty lib includes
|
||||
#include "changevaluedisplay.h"
|
||||
#include "menuitem.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "displays/bobbychangevaluedisplay.h"
|
||||
#include "utils.h"
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "displays/menus/modessettingsmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_MOTORTESTMODESETTINGS[] = "Motortest mode seetings";
|
||||
@ -22,16 +22,16 @@ using MotortestMultiplikatorChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_MOTORTESTMULTIPLIKATOR>,
|
||||
MotortestModeMultiplikatorAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<MotortestModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<MotortestModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using MotortestMaxPwmChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint16_t>,
|
||||
espgui::StaticText<TEXT_MOTORTESTMAXPWM>,
|
||||
MotortestMaxPwmAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<MotortestModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<MotortestModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -39,9 +39,9 @@ using namespace espgui;
|
||||
|
||||
MotortestModeSettingsMenu::MotortestModeSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORTESTMULTIPLIKATOR>, SwitchScreenAction<MotortestMultiplikatorChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORTESTMAXPWM>, SwitchScreenAction<MotortestMaxPwmChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<ModesSettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORTESTMULTIPLIKATOR>, PushScreenAction<MotortestMultiplikatorChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORTESTMAXPWM>, PushScreenAction<MotortestMaxPwmChangeDisplay>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string MotortestModeSettingsMenu::text() const
|
||||
@ -51,5 +51,5 @@ std::string MotortestModeSettingsMenu::text() const
|
||||
|
||||
void MotortestModeSettingsMenu::back()
|
||||
{
|
||||
switchScreen<ModesSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -2,7 +2,10 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <fmt/format.h>
|
||||
#include <icons/back.h>
|
||||
#include <menuitem.h>
|
||||
@ -13,6 +16,8 @@
|
||||
#include "globals.h"
|
||||
#include "utils.h"
|
||||
#include "settingsmenu.h"
|
||||
#include "wifistasettingsmenu.h"
|
||||
#include "wifiapsettingsmenu.h"
|
||||
#include "texthelpers/networktexthelpers.h"
|
||||
#include "wifiapsettingsmenu.h"
|
||||
#include "wifistasettingsmenu.h"
|
||||
@ -28,17 +33,16 @@ constexpr char TEXT_BACK[] = "Back";
|
||||
|
||||
NetworkSettingsMenu::NetworkSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STASETTINGS>, SwitchScreenAction<WifiStaSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_APSETTINGS>, SwitchScreenAction<WifiApSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STASETTINGS>, PushScreenAction<WifiStaSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_APSETTINGS>, PushScreenAction<WifiApSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_APQRCODE>, NetworkAccessPointQRAction>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, WifiDefaultMacText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiBaseMacText, DummyAction>>();
|
||||
constructMenuItem<makeComponentArgs<MenuItem, DnsText, DummyAction>>(uint8_t{0});
|
||||
constructMenuItem<makeComponentArgs<MenuItem, DnsText, DummyAction>>(uint8_t{1});
|
||||
constructMenuItem<makeComponentArgs<MenuItem, DnsText, DummyAction>>(uint8_t{2});
|
||||
constructMenuItem<makeComponent<MenuItem, WifiTxPowerText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<SettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string NetworkSettingsMenu::text() const
|
||||
@ -48,7 +52,7 @@ std::string NetworkSettingsMenu::text() const
|
||||
|
||||
void NetworkSettingsMenu::back()
|
||||
{
|
||||
switchScreen<SettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
||||
void NetworkAccessPointQRAction::triggered()
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include "actioninterface.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
|
||||
// local includes
|
||||
#include "icons/back.h"
|
||||
@ -12,7 +13,6 @@
|
||||
#include "displays/menus/selectotabuildmenu.h"
|
||||
#include "displays/menus/selectbuildserverbranch.h"
|
||||
#include "displays/menus/selectbuildservermenu.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "displays/updatedisplay.h"
|
||||
|
||||
namespace {
|
||||
@ -27,11 +27,11 @@ constexpr char TEXT_BACK[] = "Back";
|
||||
OtaMenu::OtaMenu()
|
||||
{
|
||||
using namespace espgui;
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILD>, SwitchScreenAction<SelectBuildMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECT_BRANCH>, SwitchScreenAction<SelectBuildserverBranchMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UPDATENOW>, SwitchScreenAction<UpdateDisplay>, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILDSERVERMENU>, SwitchScreenAction<SelectBuildServerMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILD>, PushScreenAction<SelectBuildMenu>, StaticMenuItemIcon<&bobbyicons::presets>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECT_BRANCH>, PushScreenAction<SelectBuildserverBranchMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UPDATENOW>, PushScreenAction<UpdateDisplay>, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILDSERVERMENU>, PushScreenAction<SelectBuildServerMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string OtaMenu::text() const
|
||||
@ -41,5 +41,5 @@ std::string OtaMenu::text() const
|
||||
|
||||
void OtaMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
// local includes
|
||||
#include "actions/switchprofileaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
#include "menudisplay.h"
|
||||
|
||||
@ -22,7 +21,7 @@ ProfilesMenu::ProfilesMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PROFILE1>, SwitchProfileAction<1>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PROFILE2>, SwitchProfileAction<2>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_PROFILE3>, SwitchProfileAction<3>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string ProfilesMenu::text() const
|
||||
@ -32,5 +31,5 @@ std::string ProfilesMenu::text() const
|
||||
|
||||
void ProfilesMenu::back()
|
||||
{
|
||||
switchScreen<MainMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
71
main/displays/menus/selectbatterytypemenu.cpp
Normal file
71
main/displays/menus/selectbatterytypemenu.cpp
Normal file
@ -0,0 +1,71 @@
|
||||
#include "selectbatterytypemenu.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <icons/back.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <actioninterface.h>
|
||||
#include <actions/dummyaction.h>
|
||||
|
||||
// local includes
|
||||
#include "battery.h"
|
||||
#include "newsettings.h"
|
||||
#include "utils.h"
|
||||
#include "displays/menus/batterymenu.h"
|
||||
#include "batterymenu.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_CELL_SERIES[] = "Cells (Series)";
|
||||
constexpr char TEXT_CELL_PARALLEL[] = "Cells (Parallel)";
|
||||
constexpr char TEXT_SELECT_CELL_TYPE[] = "Select Cell Type";
|
||||
constexpr char TEXT_CELL_TYPE[] = "Cell Type";
|
||||
constexpr char TEXT_BATTERY_CALIBRATE[] = "Calibrate Voltages";
|
||||
constexpr char TEXT_BATTERY_TYPE_22P[] = "22P cells";
|
||||
constexpr char TEXT_BATTERY_TYPE_HG2[] = "HG2 cells";
|
||||
constexpr char TEXT_BATTERY_TYPE_MH1[] = "MH1 cells";
|
||||
constexpr char TEXT_BATTERY_TYPE_VTC5[] = "VTC5 cells";
|
||||
constexpr char TEXT_BATTERY_TYPE_BAK_25R[] = "BAK / 25R cells";
|
||||
constexpr char TEXT_BATTERY_WHKM[] = "Wh per km";
|
||||
constexpr char TEXT_BATTERY_APPLYCALIB[] = "Apply calibration";
|
||||
constexpr char TEXT_VOLTAGECALIBRATION_RESET[] = "Reset calibration";
|
||||
constexpr char TEXT_BACK[] = "Back";
|
||||
|
||||
class CurrentBatteryTypeText : public virtual espgui::TextInterface
|
||||
{
|
||||
public:
|
||||
std::string text() const override
|
||||
{
|
||||
return getBatteryCellTypeString();
|
||||
}
|
||||
};
|
||||
|
||||
template<BatteryCellType T>
|
||||
class BatterySelectTypeAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override { configs.write_config(configs.battery.cellType, uint8_t(T)); }
|
||||
};
|
||||
} // namespace
|
||||
|
||||
BatteryTypeMenu::BatteryTypeMenu()
|
||||
{
|
||||
using namespace espgui;
|
||||
constructMenuItem<makeComponent<MenuItem, CurrentBatteryTypeText, DisabledColor, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_TYPE_22P>, BatterySelectTypeAction<BatteryCellType::_22P>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_TYPE_HG2>, BatterySelectTypeAction<BatteryCellType::HG2>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_TYPE_MH1>, BatterySelectTypeAction<BatteryCellType::MH1>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_TYPE_VTC5>, BatterySelectTypeAction<BatteryCellType::VTC5>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BATTERY_TYPE_BAK_25R>, BatterySelectTypeAction<BatteryCellType::BAK_25R>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string BatteryTypeMenu::text() const
|
||||
{
|
||||
return TEXT_SELECT_CELL_TYPE;
|
||||
}
|
||||
|
||||
void BatteryTypeMenu::back()
|
||||
{
|
||||
espgui::popScreen();
|
||||
}
|
@ -2,6 +2,9 @@
|
||||
|
||||
// 3rd party includes
|
||||
#include <espwifistack.h>
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "actions/dummyaction.h"
|
||||
@ -10,6 +13,8 @@
|
||||
#include "buildserver.h"
|
||||
#include "displays/menus/otamenu.h"
|
||||
#include "icons/back.h"
|
||||
#include "buildserver.h"
|
||||
#include "globals.h"
|
||||
#include "icons/reboot.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
@ -85,7 +90,7 @@ SelectBuildserverBranchMenu::SelectBuildserverBranchMenu()
|
||||
|
||||
#define ERR_MESSAGE(text) \
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<text>, DefaultFont, StaticColor<TFT_RED>, DummyAction>>(); \
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>(); \
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>(); \
|
||||
return;
|
||||
|
||||
if (count_available_buildserver() < 1)
|
||||
@ -144,12 +149,12 @@ void SelectBuildserverBranchMenu::update()
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECT_BRANCH_CLEAR>, ClearBranchAction, StaticMenuItemIcon<&bobbyicons::reboot>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
Base::update();
|
||||
}
|
||||
|
||||
void SelectBuildserverBranchMenu::back()
|
||||
{
|
||||
espgui::switchScreen<OtaMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -4,14 +4,13 @@
|
||||
#include <esp_log.h>
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <fmt/core.h>
|
||||
#include <icons/back.h>
|
||||
#include <actions/dummyaction.h>
|
||||
|
||||
// local includes
|
||||
#include "buildserver.h"
|
||||
#include "displays/menus/otamenu.h"
|
||||
#include "utils.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
@ -69,7 +68,7 @@ SelectBuildServerMenu::SelectBuildServerMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_NOBUILDSERVERCONFIGURED>, DefaultFont, StaticColor<TFT_RED>, DummyAction>>();
|
||||
}
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string SelectBuildServerMenu::text() const
|
||||
@ -79,5 +78,5 @@ std::string SelectBuildServerMenu::text() const
|
||||
|
||||
void SelectBuildServerMenu::back()
|
||||
{
|
||||
espgui::switchScreen<OtaMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -2,9 +2,10 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actions/multiaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <textwithvaluehelper.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
@ -20,7 +21,7 @@
|
||||
#include "modes/wheelchairmode.h"
|
||||
#endif
|
||||
#include "accessors/globalaccessors.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
#include "mainmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_SELECTMODE[] = "Select mode";
|
||||
@ -60,19 +61,19 @@ using namespace espgui;
|
||||
|
||||
SelectModeMenu::SelectModeMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEFAULT>, MultiAction<SetDefaultModeAction, SwitchScreenAction<MainMenu>>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_TEMPOMAT, AvgSpeedAccessor>, MultiAction<SetTempomatModeAction, SwitchScreenAction<MainMenu>>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LARSM>, MultiAction<SetLarsmModeAction, SwitchScreenAction<MainMenu>>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MICK>, MultiAction<SetMickModeAction, SwitchScreenAction<MainMenu>>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REMOTECONTROL>, MultiAction<SetRemoteControlModeAction, SwitchScreenAction<MainMenu>>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DEFAULT>, MultiAction<SetDefaultModeAction, PushScreenAction<MainMenu>>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_TEMPOMAT, AvgSpeedAccessor>, MultiAction<SetTempomatModeAction, PushScreenAction<MainMenu>>>>(); }
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LARSM>, MultiAction<SetLarsmModeAction, PushScreenAction<MainMenu>>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MICK>, MultiAction<SetMickModeAction, PushScreenAction<MainMenu>>>>();
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REMOTECONTROL>, MultiAction<SetRemoteControlModeAction, PushScreenAction<MainMenu>>>>(); }
|
||||
#ifdef FEATURE_GAMETRAK
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMETRAK>, MultiAction<SetGametrakModeAction, SwitchScreenAction<MainMenu>>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_GAMETRAK>, MultiAction<SetGametrakModeAction, PopScreenAction>>>();
|
||||
#endif
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORTEST>, MultiAction<SetMotorTestModeAction, SwitchScreenAction<MainMenu>>>>(); }
|
||||
if (!simplified) { constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MOTORTEST>, MultiAction<SetMotorTestModeAction, PushScreenAction<MainMenu>>>>(); }
|
||||
#ifdef FEATURE_JOYSTICK
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_WHEELCHAIR>, MultiAction<SetWheelchairModeAction, SwitchScreenAction<MainMenu>>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_WHEELCHAIR>, MultiAction<SetWheelchairModeAction, PushScreenAction<MainMenu>>>>();
|
||||
#endif
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PushScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string SelectModeMenu::text() const
|
||||
@ -113,5 +114,5 @@ void SelectModeMenu::start()
|
||||
|
||||
void SelectModeMenu::back()
|
||||
{
|
||||
switchScreen<MainMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -4,6 +4,9 @@
|
||||
#include <TFT_eSPI.h>
|
||||
#include "esp_log.h"
|
||||
#include "fmt/core.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "actions/dummyaction.h"
|
||||
@ -12,6 +15,9 @@
|
||||
#include "buildserver.h"
|
||||
#include "displays/menus/otamenu.h"
|
||||
#include "icons/back.h"
|
||||
#include "buildserver.h"
|
||||
#include "utils.h"
|
||||
#include "globals.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
#define MESSAGE(text) constructMenuItem<makeComponent<MenuItem, StaticText<text>, DefaultFont, StaticColor<TFT_RED>, DummyAction>>()
|
||||
@ -58,12 +64,12 @@ SelectBuildMenu::SelectBuildMenu()
|
||||
if (buildserver::count_available_buildserver() < 1)
|
||||
{
|
||||
MESSAGE(TEXT_OTA_NOBUILDSERVERAVAILABLE);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
else if (configs.otaServerUrl.value.empty())
|
||||
{
|
||||
MESSAGE(TEXT_OTA_NOBUILDSERVERSELECTED);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -71,7 +77,7 @@ SelectBuildMenu::SelectBuildMenu()
|
||||
if (staStatus != wifi_stack::WiFiStaStatus::CONNECTED)
|
||||
{
|
||||
MESSAGE(TEXT_OTA_NOCONNECTION);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -84,7 +90,7 @@ SelectBuildMenu::SelectBuildMenu()
|
||||
auto hash = filename.substr(0, filename.length() - 4);
|
||||
menuitem.setHash(hash);
|
||||
menuitem.setUrl(serverUrl);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -135,10 +141,10 @@ void SelectBuildMenu::buildMenuFromJson()
|
||||
menuitem.setHash(hash);
|
||||
menuitem.setUrl(fmt::format(url_for_hashes, hash));
|
||||
}
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<OtaMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
void SelectBuildMenu::back()
|
||||
{
|
||||
switchScreen<OtaMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/pushscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
@ -81,39 +82,39 @@ SettingsMenu::SettingsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKLIGHT>, BobbyCheckbox, BacklightAccessor>>();
|
||||
#endif
|
||||
if (!simplified)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LIMITSSETTINGS>, SwitchScreenAction<LimitsSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_LIMITSSETTINGS>, PushScreenAction<LimitsSettingsMenu>>>();
|
||||
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_NETWORKSETTINGS>, SwitchScreenAction<NetworkSettingsMenu>, StaticMenuItemIcon<&bobbyicons::wifi>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_NETWORKSETTINGS>, PushScreenAction<NetworkSettingsMenu>, StaticMenuItemIcon<&bobbyicons::wifi>>>();
|
||||
if (configs.feature.esp_now.isEnabled.value)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ESPNOW>, SwitchScreenAction<EspNowMenu>, StaticMenuItemIcon<&bobbyicons::wifi>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ESPNOW>, PushScreenAction<EspNowMenu>, StaticMenuItemIcon<&bobbyicons::wifi>>>();
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BLUETOOTHSETTINGS>, SwitchScreenAction<BluetoothSettingsMenu>, StaticMenuItemIcon<&bobbyicons::bluetooth>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BLUETOOTHSETTINGS>, PushScreenAction<BluetoothSettingsMenu>, StaticMenuItemIcon<&bobbyicons::bluetooth>>>();
|
||||
#endif
|
||||
if (configs.feature.ble.isEnabled.value)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BLESETTINGS>, SwitchScreenAction<BleSettingsMenu>, StaticMenuItemIcon<&bobbyicons::bluetooth>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BLESETTINGS>, PushScreenAction<BleSettingsMenu>, StaticMenuItemIcon<&bobbyicons::bluetooth>>>();
|
||||
if (configs.feature.cloud.isEnabled.value)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CLOUDSETTINGS>, SwitchScreenAction<CloudSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CLOUDSETTINGS>, PushScreenAction<CloudSettingsMenu>>>();
|
||||
if (configs.feature.udpcloud.isEnabled.value)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UDPCLOUDSETTINGS>, SwitchScreenAction<UdpCloudSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_UDPCLOUDSETTINGS>, PushScreenAction<UdpCloudSettingsMenu>>>();
|
||||
if (configs.feature.ota.isEnabled.value)
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILDSERVERMENU>, SwitchScreenAction<SelectBuildServerMenu>, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TIME>, SwitchScreenAction<TimeSettingsMenu>, StaticMenuItemIcon<&bobbyicons::time>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_SELECTBUILDSERVERMENU>, PushScreenAction<SelectBuildServerMenu>, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_TIME>, PushScreenAction<TimeSettingsMenu>, StaticMenuItemIcon<&bobbyicons::time>>>();
|
||||
if (!simplified)
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODESSETTINGS>, SwitchScreenAction<ModesSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CONTROLLERHARDWARESETTINGS>, SwitchScreenAction<ControllerHardwareSettingsMenu>, StaticMenuItemIcon<&bobbyicons::hardware>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BOARDCOMPUTERHARDWARESETTINGS>, SwitchScreenAction<BoardcomputerHardwareSettingsMenu>, StaticMenuItemIcon<&bobbyicons::hardware>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODESSETTINGS>, PushScreenAction<ModesSettingsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CONTROLLERHARDWARESETTINGS>, PushScreenAction<ControllerHardwareSettingsMenu>, StaticMenuItemIcon<&bobbyicons::hardware>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BOARDCOMPUTERHARDWARESETTINGS>, PushScreenAction<BoardcomputerHardwareSettingsMenu>, StaticMenuItemIcon<&bobbyicons::hardware>>>();
|
||||
}
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FEATUREFLAGS>, SwitchScreenAction<FeatureFlagsMenu>, StaticMenuItemIcon<&bobbyicons::demos>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FEATUREFLAGS>, PushScreenAction<FeatureFlagsMenu>, StaticMenuItemIcon<&bobbyicons::demos>>>();
|
||||
//#if defined(FEATURE_BLUETOOTH) && defined(FEATURE_BMS)
|
||||
// constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_AUTOCONNECTBMS>, BobbyCheckbox, AutoConnectBmsAccessor>>();
|
||||
//#endif
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BUZZER>, SwitchScreenAction<BuzzerMenu>, StaticMenuItemIcon<&bobbyicons::buzzer>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BUZZER>, PushScreenAction<BuzzerMenu>, StaticMenuItemIcon<&bobbyicons::buzzer>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_FRONTLED>, BobbyCheckbox, FrontLedAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACKLED>, BobbyCheckbox, BackLedAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CRASHMENU>, SwitchScreenAction<CrashMenu>, StaticMenuItemIcon<&bobbyicons::demos>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ABOUT>, SwitchScreenAction<AboutMenu>, StaticMenuItemIcon<&bobbyicons::info>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CRASHMENU>, PushScreenAction<CrashMenu>, StaticMenuItemIcon<&bobbyicons::demos>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ABOUT>, PushScreenAction<AboutMenu>, StaticMenuItemIcon<&bobbyicons::info>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string SettingsMenu::text() const
|
||||
@ -123,5 +124,5 @@ std::string SettingsMenu::text() const
|
||||
|
||||
void SettingsMenu::back()
|
||||
{
|
||||
switchScreen<MainMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -3,13 +3,12 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "actions/popscreenaction.h"
|
||||
#include "actioninterface.h"
|
||||
#include "fmt/core.h"
|
||||
#include "icons/back.h"
|
||||
|
||||
// local includes
|
||||
#include "mainmenu.h"
|
||||
#include "utils.h"
|
||||
#include "icons/time.h"
|
||||
#include "icons/reboot.h"
|
||||
@ -187,7 +186,7 @@ StatisticsMenu::StatisticsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, EmptyText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATSSAVE>, SaveKilometersAction, StaticMenuItemIcon<&bobbyicons::update>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STATSCLEAR>, ClearCurrentStatsAction, StaticMenuItemIcon<&bobbyicons::reboot>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string StatisticsMenu::text() const
|
||||
@ -197,5 +196,5 @@ std::string StatisticsMenu::text() const
|
||||
|
||||
void StatisticsMenu::back()
|
||||
{
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
@ -2,13 +2,12 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <icons/back.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <schedulertask.h>
|
||||
#include <fmt/core.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/debugmenu.h"
|
||||
#include "taskmanager.h"
|
||||
|
||||
using namespace espgui;
|
||||
@ -38,7 +37,7 @@ TaskmanagerMenu::TaskmanagerMenu()
|
||||
{
|
||||
for (const auto &task : schedulerTasks)
|
||||
constructMenuItem<makeComponentArgs<MenuItem, TaskText, DummyAction>>(task);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<DebugMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string TaskmanagerMenu::text() const
|
||||
@ -48,5 +47,5 @@ std::string TaskmanagerMenu::text() const
|
||||
|
||||
void TaskmanagerMenu::back()
|
||||
{
|
||||
switchScreen<DebugMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <changevaluedisplay.h>
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <textwithvaluehelper.h>
|
||||
|
||||
@ -14,7 +15,6 @@
|
||||
#include "accessors/settingsaccessors.h"
|
||||
#include "accessors/globalaccessors.h"
|
||||
#include "actions/tempomatmodeapplycurrentpeedaction.h"
|
||||
#include "displays/menus/modessettingsmenu.h"
|
||||
|
||||
namespace {
|
||||
constexpr char TEXT_TEMPOMATMODESETTINGS[] = "Tempomat mode settings";
|
||||
@ -27,16 +27,16 @@ using TempomatModeCruiseMotTgtChangeDisplay = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int16_t>,
|
||||
espgui::StaticText<TEXT_NCRUISEMOTTGT>,
|
||||
TempomatModeCruiseMotTgtAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<TempomatModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<TempomatModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using TempomatModeModelModeChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<UnifiedModelMode>,
|
||||
espgui::StaticText<TEXT_MODELMODE>,
|
||||
TempomatModeModelModeAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<TempomatModeSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<TempomatModeSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -45,9 +45,9 @@ using namespace espgui;
|
||||
TempomatModeSettingsMenu::TempomatModeSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_APPLY, AvgSpeedAccessor>, TempomatModeApplyCurrentSpeedAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NCRUISEMOTTGT, TempomatModeCruiseMotTgtAccessor>, SwitchScreenAction<TempomatModeModelModeChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODELMODE>, SwitchScreenAction<TempomatModeModelModeChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<ModesSettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_NCRUISEMOTTGT, TempomatModeCruiseMotTgtAccessor>, PushScreenAction<TempomatModeModelModeChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_MODELMODE>, PushScreenAction<TempomatModeModelModeChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string TempomatModeSettingsMenu::text() const
|
||||
@ -57,5 +57,5 @@ std::string TempomatModeSettingsMenu::text() const
|
||||
|
||||
void TempomatModeSettingsMenu::back()
|
||||
{
|
||||
switchScreen<ModesSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -4,11 +4,12 @@
|
||||
#include <configwrapper.h>
|
||||
#include <fmt/core.h>
|
||||
#include <icons/back.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "actions/dummyaction.h"
|
||||
#include "actions/switchscreenaction.h"
|
||||
#include "displays/bobbymenudisplay.h"
|
||||
#include "bobbyerrorhandler.h"
|
||||
|
||||
@ -57,7 +58,7 @@ private:
|
||||
ConfigWrapper<TEnum>* m_config;
|
||||
};
|
||||
|
||||
template<typename TEnum, typename TMenu>
|
||||
template<typename TEnum>
|
||||
class TypeSafeChangeMenu :
|
||||
public BobbyMenuDisplay
|
||||
{
|
||||
@ -71,7 +72,7 @@ public:
|
||||
iterateEnum<TEnum>::iterate([&](TEnum enum_value, const auto &string_value){
|
||||
constructMenuItem<TypesafeEnumSetterMenuItem<TEnum>>(enum_value, m_config);
|
||||
});
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<TMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
||||
std::string text() const override
|
||||
@ -81,7 +82,7 @@ public:
|
||||
|
||||
void back() override
|
||||
{
|
||||
espgui::switchScreen<TMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
private:
|
||||
ConfigWrapper<TEnum>* m_config;
|
||||
@ -102,7 +103,47 @@ public:
|
||||
|
||||
void triggered() override
|
||||
{
|
||||
espgui::switchScreen<typesafeenumchangemenu::TypeSafeChangeMenu<TEnum, TMenu>>(m_config);
|
||||
espgui::switchScreen<typesafeenumchangemenu::TypeSafeChangeMenu<TEnum>>(m_config);
|
||||
}
|
||||
private:
|
||||
ConfigWrapper<TEnum>* m_config;
|
||||
};
|
||||
|
||||
template<typename TEnum, const char *Ttext>
|
||||
class PopScreenTypeSafeChangeMenuItem : public espgui::MenuItem
|
||||
{
|
||||
public:
|
||||
PopScreenTypeSafeChangeMenuItem(ConfigWrapper<TEnum>* config) : m_config{config} {}
|
||||
|
||||
static constexpr const char *STATIC_TEXT = Ttext;
|
||||
std::string text() const override
|
||||
{
|
||||
return Ttext;
|
||||
}
|
||||
|
||||
void triggered() override
|
||||
{
|
||||
espgui::popScreen();
|
||||
}
|
||||
private:
|
||||
ConfigWrapper<TEnum>* m_config;
|
||||
};
|
||||
|
||||
template<typename TEnum, const char *Ttext>
|
||||
class PushScreenTypeSafeChangeMenuItem : public espgui::MenuItem
|
||||
{
|
||||
public:
|
||||
PushScreenTypeSafeChangeMenuItem(ConfigWrapper<TEnum>* config) : m_config{config} {}
|
||||
|
||||
static constexpr const char *STATIC_TEXT = Ttext;
|
||||
std::string text() const override
|
||||
{
|
||||
return Ttext;
|
||||
}
|
||||
|
||||
void triggered() override
|
||||
{
|
||||
espgui::pushScreen<typesafeenumchangemenu::TypeSafeChangeMenu<TEnum>>(m_config);
|
||||
}
|
||||
private:
|
||||
ConfigWrapper<TEnum>* m_config;
|
||||
|
@ -9,7 +9,7 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <fmt/format.h>
|
||||
@ -51,12 +51,12 @@ private:
|
||||
WifiApClientsMenu::WifiApClientsMenu() :
|
||||
espgui::ChangeableText{"AP Clients"s}
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<WifiApSettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
void WifiApClientsMenu::back()
|
||||
{
|
||||
switchScreen<WifiApSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
||||
void WifiApClientsMenu::start()
|
||||
|
@ -6,7 +6,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <espwifistack.h>
|
||||
@ -56,48 +57,48 @@ using ApSsidChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<std::string>,
|
||||
espgui::StaticText<TEXT_SSID>,
|
||||
WifiApSsidAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using ApKeyChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<std::string>,
|
||||
espgui::StaticText<TEXT_KEY>,
|
||||
WifiApKeyAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using ApIpChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<wifi_stack::ip_address_t>,
|
||||
espgui::StaticText<TEXT_IP>,
|
||||
WifiApIpAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using ApMaskChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<wifi_stack::ip_address_t>,
|
||||
espgui::StaticText<TEXT_MASK>,
|
||||
WifiApMaskAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using ApChannelChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<uint8_t>,
|
||||
espgui::StaticText<TEXT_CHANNEL>,
|
||||
WifiApChannelAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
|
||||
using ApAuthmodeChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<wifi_auth_mode_t>,
|
||||
espgui::StaticText<TEXT_AUTHMODE>,
|
||||
WifiApAuthmodeAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiApSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -105,16 +106,16 @@ WifiApSettingsMenu::WifiApSettingsMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLED>, BobbyCheckbox, WifiApEnabledAccessor>>();
|
||||
//constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_DISABLEWHENONLINE>, BobbyCheckbox, WifiApDisableWhenOnlineAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SSID_FORMATTED, WifiApSsidAccessor>, SwitchScreenAction<ApSsidChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_KEY_FORMATTED, WifiApKeyAccessor>, SwitchScreenAction<ApKeyChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_SSID_FORMATTED, WifiApSsidAccessor>, PushScreenAction<ApSsidChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_KEY_FORMATTED, WifiApKeyAccessor>, PushScreenAction<ApKeyChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiApMacText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_IP_FORMATTED, WifiApIpAccessor>, SwitchScreenAction<ApIpChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_MASK_FORMATTED, WifiApMaskAccessor>, SwitchScreenAction<ApMaskChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CHANNEL_FORMATTED, WifiApChannelAccessor>, SwitchScreenAction<ApChannelChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_AUTHMODE_FORMATTED, WifiApAuthmodeAccessor>, SwitchScreenAction<ApAuthmodeChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_IP_FORMATTED, WifiApIpAccessor>, PushScreenAction<ApIpChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_MASK_FORMATTED, WifiApMaskAccessor>, PushScreenAction<ApMaskChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_CHANNEL_FORMATTED, WifiApChannelAccessor>, PushScreenAction<ApChannelChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_AUTHMODE_FORMATTED, WifiApAuthmodeAccessor>, PushScreenAction<ApAuthmodeChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiApHostnameText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiApClientsText, WifiApClientsAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<NetworkSettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string WifiApSettingsMenu::text() const
|
||||
@ -124,7 +125,7 @@ std::string WifiApSettingsMenu::text() const
|
||||
|
||||
void WifiApSettingsMenu::back()
|
||||
{
|
||||
switchScreen<NetworkSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
@ -132,7 +133,7 @@ void WifiApClientsAction::triggered()
|
||||
{
|
||||
wifi_sta_list_t clients;
|
||||
if (const auto result = esp_wifi_ap_get_sta_list(&clients); result == ESP_OK)
|
||||
switchScreen<WifiApClientsMenu>();
|
||||
pushScreen<WifiApClientsMenu>();
|
||||
else
|
||||
ESP_LOGW(TAG, "esp_wifi_ap_get_sta_list() failed with %s", esp_err_to_name(result));
|
||||
}
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <changevaluedisplay.h>
|
||||
@ -48,8 +49,8 @@ class StaChangeScreen :
|
||||
public:
|
||||
explicit StaChangeScreen(int index) : Taccessor{index}, m_index{index} {}
|
||||
std::string text() const override { return fmt::format(Ttitle, m_index + 1); }
|
||||
void confirm() override { espgui::switchScreen<WifiStaConfigEntryMenu>(m_index); }
|
||||
void back() override { espgui::switchScreen<WifiStaConfigEntryMenu>(m_index); }
|
||||
void confirm() override { espgui::popScreen(); }
|
||||
void back() override { espgui::popScreen(); }
|
||||
|
||||
private:
|
||||
const int m_index;
|
||||
@ -66,7 +67,7 @@ public:
|
||||
m_index{index}
|
||||
{}
|
||||
|
||||
void triggered() override { espgui::switchScreen<TchangeScreen>(m_index); }
|
||||
void triggered() override { espgui::pushScreen<TchangeScreen>(m_index); }
|
||||
|
||||
private:
|
||||
const int m_index;
|
||||
@ -123,7 +124,7 @@ WifiStaConfigEntryMenu::WifiStaConfigEntryMenu(int index) :
|
||||
constructMenuItem<StaStaticDns1MenuItem>(index);
|
||||
constructMenuItem<StaStaticDns2MenuItem>(index);
|
||||
constructMenuItem<makeComponentArgs<MenuItem, ClearConfigAction, StaticText<TEXT_DELETECONFIG>>>(index);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<WifiStaConfigsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string WifiStaConfigEntryMenu::text() const
|
||||
@ -133,7 +134,7 @@ std::string WifiStaConfigEntryMenu::text() const
|
||||
|
||||
void WifiStaConfigEntryMenu::back()
|
||||
{
|
||||
espgui::switchScreen<WifiStaConfigsMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <fmt/core.h>
|
||||
@ -37,7 +38,7 @@ WifiStaConfigsMenu::WifiStaConfigsMenu()
|
||||
{
|
||||
for (int i = 0; i < configs.wifi_configs.size(); i++)
|
||||
constructMenuItem<WifiStaConfigurationMenuItem>(i);
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<WifiStaSettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string WifiStaConfigsMenu::text() const
|
||||
@ -47,14 +48,14 @@ std::string WifiStaConfigsMenu::text() const
|
||||
|
||||
void WifiStaConfigsMenu::back()
|
||||
{
|
||||
switchScreen<WifiStaSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void WifiStaConfigurationMenuItem::triggered()
|
||||
{
|
||||
switchScreen<WifiStaConfigEntryMenu>(m_index);
|
||||
pushScreen<WifiStaConfigEntryMenu>(m_index);
|
||||
}
|
||||
|
||||
std::string WifiStaConfigurationMenuItem::text() const
|
||||
|
@ -9,7 +9,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <fmt/format.h>
|
||||
@ -97,7 +98,7 @@ WifiStaScanEntryMenu::WifiStaScanEntryMenu(const wifi_ap_record_t &info) :
|
||||
default: return std::to_string(m_info.country.policy);
|
||||
}
|
||||
}()));
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<WifiStaScanMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string WifiStaScanEntryMenu::text() const
|
||||
@ -107,7 +108,7 @@ std::string WifiStaScanEntryMenu::text() const
|
||||
|
||||
void WifiStaScanEntryMenu::back()
|
||||
{
|
||||
switchScreen<WifiStaScanMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
||||
namespace {
|
||||
@ -128,7 +129,7 @@ void SaveNewWifiConfigAction::triggered()
|
||||
return;
|
||||
}
|
||||
|
||||
switchScreen<WifiStaConfigEntryMenu>(std::distance(std::begin(configs.wifi_configs), iter));
|
||||
pushScreen<WifiStaConfigEntryMenu>(std::distance(std::begin(configs.wifi_configs), iter));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -5,7 +5,8 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <fmt/format.h>
|
||||
@ -17,7 +18,6 @@
|
||||
// local includes
|
||||
#include "actions/wifistascanaction.h"
|
||||
#include "actions/wifistascanclearaction.h"
|
||||
#include "wifistasettingsmenu.h"
|
||||
#include "wifiguiutils.h"
|
||||
#include "wifistascanentrymenu.h"
|
||||
#include "newsettings.h"
|
||||
@ -50,7 +50,7 @@ WifiStaScanMenu::WifiStaScanMenu()
|
||||
{
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_STARTSCAN>, WifiStaScanAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CLEARRESULTS>, WifiStaScanClearAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<WifiStaSettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string WifiStaScanMenu::text() const
|
||||
@ -77,7 +77,7 @@ std::string WifiStaScanMenu::text() const
|
||||
|
||||
void WifiStaScanMenu::back()
|
||||
{
|
||||
switchScreen<WifiStaSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
||||
void WifiStaScanMenu::start()
|
||||
@ -124,7 +124,7 @@ namespace {
|
||||
|
||||
void WifiStaScanMenuItem::triggered()
|
||||
{
|
||||
switchScreen<WifiStaScanEntryMenu>(m_info);
|
||||
pushScreen<WifiStaScanEntryMenu>(m_info);
|
||||
}
|
||||
|
||||
std::string WifiStaScanMenuItem::text() const
|
||||
|
@ -3,7 +3,8 @@
|
||||
// 3rdparty lib includes
|
||||
#include <menuitem.h>
|
||||
#include <actions/dummyaction.h>
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <actions/pushscreenaction.h>
|
||||
#include <actions/popscreenaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <changevaluedisplay.h>
|
||||
@ -14,7 +15,6 @@
|
||||
#include "wifistascanmenu.h"
|
||||
#include "wifistaconfigsmenu.h"
|
||||
#include "accessors/wifistaconfigaccessors.h"
|
||||
#include "networksettingsmenu.h"
|
||||
#include "texthelpers/wifistatexthelpers.h"
|
||||
#include "bobbycheckbox.h"
|
||||
|
||||
@ -31,8 +31,8 @@ using StaMinRssiChangeScreen = espgui::makeComponent<
|
||||
BobbyChangeValueDisplay<int8_t>,
|
||||
espgui::StaticText<TEXT_MIN_RSSI>,
|
||||
WifiStaMinRssiAccessor,
|
||||
espgui::ConfirmActionInterface<espgui::SwitchScreenAction<WifiStaSettingsMenu>>,
|
||||
espgui::BackActionInterface<espgui::SwitchScreenAction<WifiStaSettingsMenu>>
|
||||
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
|
||||
espgui::BackActionInterface<espgui::PopScreenAction>
|
||||
>;
|
||||
} // namespace
|
||||
|
||||
@ -41,8 +41,8 @@ WifiStaSettingsMenu::WifiStaSettingsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_ENABLED>, BobbyCheckbox, WifiStaEnabledAccessor>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaStatusText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaMacText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaScanStatusText, SwitchScreenAction<WifiStaScanMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CONFIGURATIONS>, SwitchScreenAction<WifiStaConfigsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaScanStatusText, PushScreenAction<WifiStaScanMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_CONFIGURATIONS>, PushScreenAction<WifiStaConfigsMenu>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiSsidText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiBssidText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiRssiText, DummyAction>>();
|
||||
@ -55,8 +55,8 @@ WifiStaSettingsMenu::WifiStaSettingsMenu()
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaHostnameText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaIpv6LinklocalText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, WifiStaIpv6GlobalText, DummyAction>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_MIN_RSSI_FORMATTED, WifiStaMinRssiAccessor>, SwitchScreenAction<StaMinRssiChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, SwitchScreenAction<NetworkSettingsMenu>, StaticMenuItemIcon<&icons::back>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, TextWithValueHelper<TEXT_MIN_RSSI_FORMATTED, WifiStaMinRssiAccessor>, PushScreenAction<StaMinRssiChangeScreen>>>();
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
|
||||
}
|
||||
|
||||
std::string WifiStaSettingsMenu::text() const
|
||||
@ -66,5 +66,5 @@ std::string WifiStaSettingsMenu::text() const
|
||||
|
||||
void WifiStaSettingsMenu::back()
|
||||
{
|
||||
switchScreen<NetworkSettingsMenu>();
|
||||
popScreen();
|
||||
}
|
||||
|
@ -57,14 +57,9 @@ void MetersDisplay::buttonPressed(espgui::Button button)
|
||||
|
||||
switch (button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
switchScreen<MainMenu>();
|
||||
break;
|
||||
case Button::Up:
|
||||
switchScreen<StatusDisplay>();
|
||||
break;
|
||||
using espgui::Button;
|
||||
case Button::Right: pushScreen<MainMenu>(); break;
|
||||
case Button::Up: switchScreen<StatusDisplay>(); break;
|
||||
case Button::Down:
|
||||
#ifdef FEATURE_BMS
|
||||
switchScreen<BmsDisplay>();
|
||||
@ -72,5 +67,6 @@ void MetersDisplay::buttonPressed(espgui::Button button)
|
||||
switchScreen<StatusDisplay>();
|
||||
#endif
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,6 @@
|
||||
#include <tftinstance.h>
|
||||
#include <screenmanager.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/demosmenu.h"
|
||||
|
||||
PingPongDisplay::PingPongDisplay() :
|
||||
lpaddle_y(cpputils::randomNumber<uint8_t>(0, h - paddle_h, espcpputils::esp_random_device{})),
|
||||
rpaddle_y(cpputils::randomNumber<uint8_t>(0, h - paddle_h, espcpputils::esp_random_device{})),
|
||||
@ -55,8 +52,7 @@ void PingPongDisplay::buttonPressed(espgui::Button button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
espgui::switchScreen<DemosMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
#include "globals.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@ -43,7 +42,7 @@ void PoweroffDisplay::update()
|
||||
Base::update();
|
||||
|
||||
if (espchrono::millis_clock::now() - m_startTime >= 1000ms)
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
}
|
||||
|
||||
void PoweroffDisplay::stop()
|
||||
|
@ -3,11 +3,9 @@
|
||||
// 3rdparty lib includes
|
||||
#include <tftinstance.h>
|
||||
#include <screenmanager.h>
|
||||
#include "actions/switchscreenaction.h"
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "displays/menus/mainmenu.h"
|
||||
|
||||
#if defined(FEATURE_CAN) && defined(FEATURE_POWERSUPPLY)
|
||||
void PowerSupplyDisplay::initScreen()
|
||||
@ -42,7 +40,7 @@ void PowerSupplyDisplay::buttonPressed(espgui::Button button)
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
espgui::switchScreen<MainMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include "qrcodedebug.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <fmt/core.h>
|
||||
#include <tftinstance.h>
|
||||
|
||||
#include "displays/menus/debugmenu.h"
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "screenmanager.h"
|
||||
#include "newsettings.h"
|
||||
@ -26,9 +27,7 @@ void QrCodeDebugDisplay::buttonPressed(espgui::Button button)
|
||||
switch (button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
switchScreen<DebugMenu>();
|
||||
break;
|
||||
case Button::Left: popScreen(); break;
|
||||
case Button::Right:
|
||||
{
|
||||
uint8_t qrcodeBytes[qrcode_getBufferSize(7)];
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
{
|
||||
tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
m_statuslabel.redraw("OK");
|
||||
switchScreen<TMenu>();
|
||||
popScreen();
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
if (!m_waitingForResult)
|
||||
switchScreen<TMenu>();
|
||||
popScreen();
|
||||
else
|
||||
ESP_LOGW(TAG, "tried to leave while waiting for result");
|
||||
break;
|
||||
|
@ -6,9 +6,6 @@
|
||||
#include <tftinstance.h>
|
||||
#include <screenmanager.h>
|
||||
|
||||
// local includes
|
||||
#include "displays/menus/demosmenu.h"
|
||||
|
||||
void SpiroDisplay::initScreen()
|
||||
{
|
||||
Base::initScreen();
|
||||
@ -88,8 +85,7 @@ void SpiroDisplay::buttonPressed(espgui::Button button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
espgui::switchScreen<DemosMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -87,8 +87,7 @@ void StarfieldDisplay::buttonPressed(espgui::Button button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
case Button::Right:
|
||||
espgui::switchScreen<DemosMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
@ -230,9 +230,7 @@ void StatusDisplay::buttonPressed(espgui::Button button)
|
||||
switch (button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Right:
|
||||
switchScreen<MainMenu>();
|
||||
break;
|
||||
case Button::Right: pushScreen<MainMenu>(); break;
|
||||
case Button::Up:
|
||||
if (simplified)
|
||||
return;
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <esp_heap_caps.h>
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actions/switchscreenaction.h>
|
||||
#include <widgets/label.h>
|
||||
#include <widgets/progressbar.h>
|
||||
#include <espchrono.h>
|
||||
|
@ -16,7 +16,6 @@
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "ota.h"
|
||||
#include "displays/menus/otamenu.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
void UpdateDisplay::initScreen()
|
||||
@ -106,7 +105,7 @@ void UpdateDisplay::buttonPressed(espgui::Button button)
|
||||
{
|
||||
using espgui::Button;
|
||||
case Button::Left:
|
||||
espgui::switchScreen<OtaMenu>();
|
||||
espgui::popScreen();
|
||||
break;
|
||||
case Button::Right:
|
||||
if (const auto result = triggerOta(configs.otaUrl.value); !result)
|
||||
|
@ -35,7 +35,7 @@ using namespace std::chrono_literals;
|
||||
namespace {
|
||||
espchrono::millis_clock::time_point lastStatsPush;
|
||||
std::optional<espchrono::millis_clock::time_point> lastStatsUpdate;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
extern "C" void app_main()
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1255,6 +1270,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1547,6 +1563,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1253,6 +1268,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1545,6 +1561,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1255,6 +1270,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1547,6 +1563,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1253,6 +1268,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1545,6 +1561,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1253,6 +1268,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1545,6 +1561,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1255,6 +1270,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1547,6 +1563,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1253,6 +1268,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1545,6 +1561,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
@ -20,7 +20,6 @@ CONFIG_SOC_EMAC_SUPPORTED=y
|
||||
CONFIG_SOC_CPU_CORES_NUM=2
|
||||
CONFIG_SOC_ULP_SUPPORTED=y
|
||||
CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y
|
||||
CONFIG_SOC_I2S_SUPPORTED=y
|
||||
@ -30,6 +29,8 @@ CONFIG_SOC_SUPPORT_COEXISTENCE=y
|
||||
CONFIG_SOC_AES_SUPPORTED=y
|
||||
CONFIG_SOC_MPI_SUPPORTED=y
|
||||
CONFIG_SOC_SHA_SUPPORTED=y
|
||||
CONFIG_SOC_FLASH_ENC_SUPPORTED=y
|
||||
CONFIG_SOC_SECURE_BOOT_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y
|
||||
CONFIG_SOC_ADC_PERIPH_NUM=2
|
||||
@ -140,6 +141,8 @@ CONFIG_SOC_RSA_MAX_BIT_LEN=4096
|
||||
CONFIG_SOC_AES_SUPPORT_AES_128=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_192=y
|
||||
CONFIG_SOC_AES_SUPPORT_AES_256=y
|
||||
CONFIG_SOC_SECURE_BOOT_V1=y
|
||||
CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=y
|
||||
CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=32
|
||||
CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21
|
||||
CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y
|
||||
@ -210,6 +213,7 @@ CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||
@ -396,6 +400,10 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||
#
|
||||
# CONFIG_APPTRACE_DEST_JTAG is not set
|
||||
CONFIG_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_APPTRACE_DEST_UART1 is not set
|
||||
# CONFIG_APPTRACE_DEST_UART2 is not set
|
||||
CONFIG_APPTRACE_DEST_UART_NONE=y
|
||||
CONFIG_APPTRACE_UART_TASK_PRIO=1
|
||||
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||
# end of Application Level Tracing
|
||||
|
||||
@ -581,6 +589,7 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# GPIO Configuration
|
||||
#
|
||||
# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set
|
||||
# CONFIG_GPIO_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of GPIO Configuration
|
||||
|
||||
#
|
||||
@ -618,8 +627,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
#
|
||||
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||
# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
|
||||
# CONFIG_ESP_TLS_SERVER is not set
|
||||
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||
# CONFIG_ESP_TLS_INSECURE is not set
|
||||
# end of ESP-TLS
|
||||
@ -757,6 +766,12 @@ CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y
|
||||
# RTC Clock Config
|
||||
#
|
||||
# end of RTC Clock Config
|
||||
|
||||
#
|
||||
# Peripheral Control
|
||||
#
|
||||
# CONFIG_PERIPH_CTRL_FUNC_IN_IRAM is not set
|
||||
# end of Peripheral Control
|
||||
# end of Hardware Settings
|
||||
|
||||
#
|
||||
@ -1253,6 +1268,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set
|
||||
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=200
|
||||
# end of Certificate Bundle
|
||||
|
||||
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
|
||||
@ -1545,6 +1561,8 @@ CONFIG_WL_SECTOR_SIZE=4096
|
||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||
# CONFIG_WIFI_PROV_BLE_BONDING is not set
|
||||
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
|
||||
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
|
||||
# end of Wi-Fi Provisioning Manager
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user