Schon wieder irgendwas

This commit is contained in:
2023-08-14 15:34:31 +02:00
parent 101a2b03a8
commit c307b64b0a
131 changed files with 305 additions and 297 deletions

View File

@ -5,6 +5,7 @@
// 3rdparty lib includes
#include <actioninterface.h>
#include <tftcolors.h>
// local includes
#include "newsettings.h"
@ -17,14 +18,14 @@ public:
{
if (reboot)
{
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_YELLOW);
tft.fillScreen(espgui::TFT_BLACK);
tft.setTextColor(espgui::TFT_YELLOW);
tft.drawString("Reboot", 5, 5, 4);
tft.fillRect(0, 34, tft.width(), 3, TFT_WHITE);
tft.fillRect(0, 34, tft.width(), 3, espgui::TFT_WHITE);
tft.setTextColor(TFT_WHITE);
tft.setTextColor(espgui::TFT_WHITE);
tft.drawString("Rebooting now...", 0, 50, 4);
configs.reset();

View File

@ -21,7 +21,7 @@ namespace {
void BatteryGraphDisplay::initScreen(espgui::TftInterface &tft)
{
Base::initScreen(tft);
drawBatteryCurve();
drawBatteryCurve(tft);
}
std::string BatteryGraphDisplay::title() const
@ -36,7 +36,7 @@ std::string BatteryGraphDisplay::title() const
void BatteryGraphDisplay::redraw(espgui::TftInterface &tft)
{
using namespace espgui;
Base::redraw(TFT);
Base::redraw(tft);
if (const auto avgVoltage = controllers.getAvgVoltage(); avgVoltage)
{
@ -53,7 +53,7 @@ void BatteryGraphDisplay::redraw(espgui::TftInterface &tft)
tft.fillRect(lastXOffset + 2, TOP_OFFSET, onePercent, tft.height() - TOP_OFFSET, espgui::TFT_BLACK);
tft.fillRect(xOffset + 2, TOP_OFFSET, onePercent, tft.height() - TOP_OFFSET, espgui::TFT_WHITE);
m_lastBatVoltage = *avgVoltage;
drawBatteryCurve();
drawBatteryCurve(tft);
}
// tft.drawLine() code
}
@ -73,7 +73,7 @@ void BatteryGraphDisplay::buttonPressed(espgui::Button button)
}
}
void BatteryGraphDisplay::drawBatteryCurve()
void BatteryGraphDisplay::drawBatteryCurve(espgui::TftInterface &tft)
{
const auto points = count_curve_points(configs.battery.cellType.value());
const auto max_height = tft.height() - 1;

View File

@ -13,7 +13,7 @@ public:
void buttonPressed(espgui::Button button) override;
static void drawBatteryCurve();
static void drawBatteryCurve(espgui::TftInterface &tft);
private:
float m_lastBatVoltage{0};

View File

@ -4,6 +4,7 @@
#include <screenmanager.h>
#include <esprandom.h>
#include <randomutils.h>
#include <fontrenderer.h>
// local includes
#include "globals.h"
@ -32,33 +33,35 @@ void ConfiscationDisplay::initScreen(espgui::TftInterface &tft)
{
Base::initScreen(tft);
espgui::FontRenderer fontRenderer{tft};
tft.pushImage(10, 70, bobbyicons::shortcircuit.WIDTH, bobbyicons::shortcircuit.HEIGHT, bobbyicons::shortcircuit.buffer);
m_progressBar.start(tft);
m_label.start(tft);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextFont(2);
fontRenderer.setTextColor(TFT_WHITE, TFT_BLACK);
fontRenderer.setTextFont(2);
auto y = 235;
constexpr auto lineheight = 15;
tft.drawString("Bei erneuter, widerrechtlicher", 10, y+=lineheight);
tft.drawString("Beschlagnahmung wird die Selbst-", 10, y+=lineheight);
tft.drawString("Vernichtung durch Kurzschluss", 10, y+=lineheight);
tft.drawString(fmt::format("der Batterie eingeleitet (ca {:.2f}MJ)", calculateMegaJoules()), 10, y+=lineheight);
tft.drawString(tft, fontRenderer, "Bei erneuter, widerrechtlicher", 10, y+=lineheight);
tft.drawString(tft, fontRenderer, "Beschlagnahmung wird die Selbst-", 10, y+=lineheight);
tft.drawString(tft, fontRenderer, "Vernichtung durch Kurzschluss", 10, y+=lineheight);
tft.drawString(tft, fontRenderer, fmt::format("der Batterie eingeleitet (ca {:.2f}MJ)", calculateMegaJoules()), 10, y+=lineheight);
}
void ConfiscationDisplay::redraw(espgui::TftInterface &tft)
{
Base::redraw(tft);
m_progressBar.redraw(m_progress);
m_progressBar.redraw(tft, m_progress);
tft.setTextColor(TFT_YELLOW, TFT_BLACK);
tft.setTextFont(2);
m_label.redraw([](){
m_label.redraw(tft, fontRenderer, [](){
if (const auto period = espchrono::millis_clock::now().time_since_epoch() % 6000ms; period < 2000ms)
return "Halten Sie 10m Abstand.";
else if (period < 4000ms)

View File

@ -26,7 +26,7 @@ void JoystickDebugDisplay::start()
copyFromSettings();
}
std::string JoystickDebugDisplay::text() const
std::string JoystickDebugDisplay::title() const
{
return TEXT_JOYSTICK;
}

View File

@ -16,7 +16,7 @@ class JoystickDebugDisplay : public BobbyDisplayWithTitle
public:
JoystickDebugDisplay();
std::string text() const override;
std::string title() const override;
void start() override;
void update() override;
void redraw() override;

View File

@ -10,6 +10,7 @@
#include <actioninterface.h>
#include <screenmanager.h>
#include <actions/dummyaction.h>
#include <fontrenderer.h>
// local includes
#include "utils.h"
@ -71,16 +72,16 @@ void LedstripColorsDisplay::redraw(espgui::TftInterface &tft)
last_state = state_select_color;
}
tft.setTextFont(2);
tft.setTextColor(TFT_WHITE);
tft.drawString(state_select_color ?
"Please select a color!" :
"Please select a side!", 50, y_pos);
espgui::FontRenderer fontRenderer{tft};
fontRenderer.drawString(state_select_color ?
"Please select a color!" :
"Please select a side!", 50, y_pos,
espgui::TFT_WHITE, espgui::TFT_BLACK,
2);
if (!already_drew_circle)
{
drawSide(static_cast<Bobbycar_Side>(selected_side), TFT_GOLD);
drawSide(tft, static_cast<Bobbycar_Side>(selected_side), TFT_GOLD);
already_drew_circle = true;
}
}
@ -108,7 +109,7 @@ void LedstripColorsDisplay::buttonPressed(espgui::Button button)
if(!state_select_color)
{
state_select_color = true;
drawColors();
drawColors(tft);
}
else
{
@ -141,13 +142,13 @@ void LedstripColorsDisplay::buttonPressed(espgui::Button button)
/* TODO commander: move into redraw method */
if (state_select_color)
{
drawColors();
drawColors(tft);
}
else
{
tft.fillRect(0, 228, tft.width(), ((tft.width() - 40) / 8) + 4, TFT_BLACK);
clearSides();
drawSide(static_cast<Bobbycar_Side>(selected_side), TFT_GOLD);
drawSide(tft, static_cast<Bobbycar_Side>(selected_side), TFT_GOLD);
}
break;
@ -172,7 +173,7 @@ void LedstripColorsDisplay::buttonPressed(espgui::Button button)
/* TODO commander: move into redraw method */
if (state_select_color)
{
drawColors();
drawColors(tft);
}
else
{
@ -185,7 +186,7 @@ void LedstripColorsDisplay::buttonPressed(espgui::Button button)
}
}
void LedstripColorsDisplay::drawColors()
void LedstripColorsDisplay::drawColors(espgui::TftInterface &tft)
{
uint16_t width = (tft.width() - 40);
auto cube_width = width / 8;
@ -209,7 +210,7 @@ void LedstripColorsDisplay::clearSides()
}
}
void LedstripColorsDisplay::drawSide(Bobbycar_Side side, unsigned int color)
void LedstripColorsDisplay::drawSide(espgui::TftInterface &tft, Bobbycar_Side side, unsigned int color)
{
const auto middle = tft.width() / 2;
const auto width = bobbyicons::bobbycar.WIDTH;

View File

@ -21,8 +21,8 @@ public:
void buttonPressed(espgui::Button button) override;
void drawColors();
void drawSide(Bobbycar_Side side, unsigned int color);
void drawColors(espgui::TftInterface &tft);
void drawSide(espgui::TftInterface &tft, Bobbycar_Side side, unsigned int color);
void clearSides();
private:

View File

@ -5,6 +5,7 @@
// 3rdparty lib includes
#include <screenmanager.h>
#include <fontrenderer.h>
// local includes
#include "globals.h"
@ -56,35 +57,30 @@ void Lockscreen::initScreen(espgui::TftInterface &tft)
{
Base::initScreen(tft);
espgui::FontRenderer fontRenderer{tft};
tft.fillScreen(TFT_BLACK);
tft.setTextFont(4);
tft.setTextColor(TFT_YELLOW);
tft.drawString("Lock vehicle", 5, 5);
fontRenderer.drawString("Lock vehicle", 5, 5, 4, espgui::TFT_YELLOW, espgui::TFT_BLACK);
tft.fillRect(0, 34, tft.width(), 3, TFT_WHITE);
tft.fillRect(0, 34, tft.width(), 3, espgui::TFT_WHITE);
tft.setTextColor(TFT_WHITE);
tft.drawString("Enter code to unlock:", 0, 50);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
fontRenderer.drawString("Enter code to unlock:", 0, 50, 4, espgui::TFT_WHITE, espgui::TFT_BLACK);
for(int i = 0; i <= 3; i++)
{
drawRect(i, 3, TFT_WHITE);
drawRect(i, 4, TFT_WHITE);
drawRect(tft, i, 3, espgui::TFT_WHITE);
drawRect(tft, i, 4, espgui::TFT_WHITE);
}
for (auto &label : m_labels)
label.start(tft);
tft.setTextFont(7);
drawRect(m_currentIndex, 1, TFT_YELLOW);
drawRect(m_currentIndex, 2, TFT_YELLOW);
drawRect(tft, m_currentIndex, 1, espgui::TFT_YELLOW);
drawRect(tft, m_currentIndex, 2, espgui::TFT_YELLOW);
for(int i = 0; i <= m_currentIndex; i++)
m_labels[i].redraw(std::to_string(m_numbers[i]));
m_labels[i].redraw(tft, fontRenderer, std::to_string(m_numbers[i]), espgui::TFT_WHITE, espgui::TFT_BLACK, 7);
}
void Lockscreen::update()
@ -98,8 +94,8 @@ void Lockscreen::redraw(espgui::TftInterface &tft)
if (m_pressed || m_back_pressed)
{
drawRect(m_currentIndex, 1, TFT_BLACK);
drawRect(m_currentIndex, 2, TFT_BLACK);
drawRect(tft, m_currentIndex, 1, TFT_BLACK);
drawRect(tft, m_currentIndex, 2, TFT_BLACK);
if (!m_back_pressed && ++m_currentIndex>=4)
{
@ -123,18 +119,19 @@ LOCKSCREEN_PLUGIN_FIXES_2
m_numbers = {0,0,0,0};
m_currentIndex = 0;
std::for_each(std::begin(m_labels) + 1, std::end(m_labels), [](auto &label){ label.redraw("0"); });
std::for_each(std::begin(m_labels) + 1, std::end(m_labels),
[&tft](auto &label){ label.redraw(tft, "0"); });
}
else if (m_back_pressed && m_currentIndex < 3)
{
drawRect(m_currentIndex+1, 1, TFT_BLACK);
drawRect(m_currentIndex+1, 2, TFT_BLACK);
drawRect(tft, m_currentIndex+1, 1, TFT_BLACK);
drawRect(tft, m_currentIndex+1, 2, TFT_BLACK);
}
m_labels[m_currentIndex].redraw(std::to_string(m_numbers[m_currentIndex]));
m_labels[m_currentIndex].redraw(tft, std::to_string(m_numbers[m_currentIndex]));
drawRect(m_currentIndex, 1, TFT_YELLOW);
drawRect(m_currentIndex, 2, TFT_YELLOW);
drawRect(tft, m_currentIndex, 1, TFT_YELLOW);
drawRect(tft, m_currentIndex, 2, TFT_YELLOW);
m_pressed = false;
m_back_pressed = false;
@ -204,7 +201,7 @@ void Lockscreen::buttonPressed(espgui::Button button)
}
}
void Lockscreen::drawRect(int index, int offset, uint32_t color) const
void Lockscreen::drawRect(espgui::TftInterface &tft, int index, int offset, uint32_t color) const
{
tft.drawRect(m_labels[index].x()-offset, m_labels[index].y()-offset, boxWidth+(offset*2), boxHeight+(offset*2), color);
}

View File

@ -32,7 +32,7 @@ public:
void buttonPressed(espgui::Button button) override;
private:
void drawRect(int index, int offset, uint32_t color) const;
void drawRect(espgui::TftInterface &tft, int index, int offset, uint32_t color) const;
std::array<espgui::Label, 4> m_labels {{
espgui::Label{spacing, 100}, // boxWidth, boxHeight

View File

@ -2,6 +2,7 @@
// 3rdparty lib includes
#include <fmt/core.h>
#include <fontrenderer.h>
// local includes
#include "utils.h"
@ -18,8 +19,7 @@ void MenuDisplayWithTime::initScreen(espgui::TftInterface &tft)
void MenuDisplayWithTime::redraw(espgui::TftInterface &tft)
{
Base::redraw(tft);
tft.setTextFont(use_big_font() ? 4 : 2);
m_label_currentTime.redraw(tft, fontRenderer, fmt::format("&7Time: {}", local_clock_string()));
m_label_currentTime.redraw(tft, fmt::format("&7Time: {}", local_clock_string()), espgui::TFT_WHITE, espgui::TFT_BLACK, use_big_font() ? 4 : 2);
}
} // namespace

View File

@ -84,7 +84,7 @@ BatteryDebugMenu::BatteryDebugMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string BatteryDebugMenu::text() const
std::string BatteryDebugMenu::title() const
{
return TEXT_BATTERYDEBUG;
}

View File

@ -8,7 +8,7 @@ class BatteryDebugMenu : public BobbyMenuDisplay
public:
BatteryDebugMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -9,6 +9,7 @@
#include <changevaluedisplay.h>
#include <textwithvaluehelper.h>
#include <fmt/core.h>
#include <tftcolors.h>
// Local includes
#include "utils.h"
@ -52,7 +53,7 @@ class WhStatisticsText : public virtual espgui::TextInterface { public: std::str
using BatteryCellSeriesChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_CELL_SERIES>,
espgui::StaticTitle<TEXT_CELL_SERIES>,
BatterySeriesCellsAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -60,7 +61,7 @@ using BatteryCellSeriesChangeScreen = espgui::makeComponent<
using BatteryCellParallelChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_CELL_PARALLEL>,
espgui::StaticTitle<TEXT_CELL_PARALLEL>,
BatteryParallelCellsAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -68,7 +69,7 @@ using BatteryCellParallelChangeScreen = espgui::makeComponent<
using BatteryWHperKMChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint16_t>,
espgui::StaticText<TEXT_BATTERY_WHKM>,
espgui::StaticTitle<TEXT_BATTERY_WHKM>,
BatteryWHperKMAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -99,8 +100,8 @@ std::string BatteryMenu::title() const
void BatteryMenu::initScreen(espgui::TftInterface &tft)
{
Base::initScreen(tft);
m_batPercentBootLabel.start();
m_batPercentNowLabel.start();
m_batPercentBootLabel.start(tft);
m_batPercentNowLabel.start(tft);
}
void BatteryMenu::start()
@ -121,11 +122,11 @@ void BatteryMenu::redraw(espgui::TftInterface &tft)
m_doubleProgressBarBatPercentage.redraw(batPercent, *battery::bootBatPercentage);
tft.setTextFont(2);
tft.setTextColor(TFT_DARKGREY, TFT_BLACK);
tft.setTextColor(espgui::TFT_DARKGREY, espgui::TFT_BLACK);
m_batPercentNowLabel.redraw(fmt::format("{:.2f} %", batPercent));
m_batPercentBootLabel.redraw(fmt::format("{:.2f} %", *battery::bootBatPercentage));
tft.setTextFont(4);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextColor(espgui::TFT_WHITE, espgui::TFT_BLACK);
}
}
}

View File

@ -26,7 +26,7 @@ constexpr char TEXT_BACK[] = "Back";
using ApSsidChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<std::string>,
espgui::StaticText<TEXT_NAME>,
espgui::StaticTitle<TEXT_NAME>,
BluetoothNameAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -44,7 +44,7 @@ BleSettingsMenu::BleSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string BleSettingsMenu::text() const
std::string BleSettingsMenu::title() const
{
return TEXT_BLESETTINGS;
}

View File

@ -8,7 +8,7 @@ class BleSettingsMenu : public BobbyMenuDisplay
public:
BleSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -76,35 +76,35 @@ public:
using SampleCountChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SAMPLECOUNT>,
espgui::StaticTitle<TEXT_SAMPLECOUNT>,
SampleCountAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GasMinChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_GASMIN>,
espgui::StaticTitle<TEXT_GASMIN>,
GasMinAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GasMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_GASMAX>,
espgui::StaticTitle<TEXT_GASMAX>,
GasMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using BremsMinChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_BREMSMIN>,
espgui::StaticTitle<TEXT_BREMSMIN>,
BremsMinAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using BremsMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_BREMSMAX>,
espgui::StaticTitle<TEXT_BREMSMAX>,
BremsMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -114,14 +114,14 @@ using BremsMaxChangeScreen = espgui::makeComponent<
#if defined(FEATURE_DPAD) || defined(FEATURE_DPAD_3WIRESW) || defined(FEATURE_DPAD_5WIRESW) || defined(FEATURE_DPAD_5WIRESW_2OUT) || defined (FEATURE_DPAD_6WIRESW) || defined (DPAD_BOARDCOMPUTER_V2)
using DPadDebounceChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_DPADDEBOUNCE>,
espgui::StaticTitle<TEXT_DPADDEBOUNCE>,
DPadDebounceAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using ButtonDelayChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint16_t>,
espgui::StaticText<TEXT_BUTTONDELAY>,
espgui::StaticTitle<TEXT_BUTTONDELAY>,
ButtonDelayAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -144,42 +144,42 @@ public:
using GametrakXMinChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SETGAMETRAKXMIN>,
espgui::StaticTitle<TEXT_SETGAMETRAKXMIN>,
GametrakXMinAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GametrakXMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SETGAMETRAKXMAX>,
espgui::StaticTitle<TEXT_SETGAMETRAKXMAX>,
GametrakXMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GametrakYMinChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SETGAMETRAKYMIN>,
espgui::StaticTitle<TEXT_SETGAMETRAKYMIN>,
GametrakYMinAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GametrakYMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SETGAMETRAKYMAX>,
espgui::StaticTitle<TEXT_SETGAMETRAKYMAX>,
GametrakYMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GametrakDistMinChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SETGAMETRAKDISTMIN>,
espgui::StaticTitle<TEXT_SETGAMETRAKDISTMIN>,
GametrakDistMinAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using GametrakDistMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SETGAMETRAKDISTMAX>,
espgui::StaticTitle<TEXT_SETGAMETRAKDISTMAX>,
GametrakDistMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -229,7 +229,7 @@ BoardcomputerHardwareSettingsMenu::BoardcomputerHardwareSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
}
std::string BoardcomputerHardwareSettingsMenu::text() const
std::string BoardcomputerHardwareSettingsMenu::title() const
{
return TEXT_BOARDCOMPUTERHARDWARESETTINGS;
}

View File

@ -8,7 +8,7 @@ class BoardcomputerHardwareSettingsMenu : public BobbyMenuDisplay
public:
BoardcomputerHardwareSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -31,7 +31,7 @@ constexpr char TEXT_BACK[] = "Back";
struct FrontFreqAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.front.command.buzzer.freq; } };
using FrontFreqChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_FRONTFREQ>,
espgui::StaticTitle<TEXT_FRONTFREQ>,
FrontFreqAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -40,7 +40,7 @@ using FrontFreqChangeScreen = espgui::makeComponent<
struct FrontPatternAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.front.command.buzzer.pattern; } };
using FrontPatternChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_FRONTPATTERN>,
espgui::StaticTitle<TEXT_FRONTPATTERN>,
FrontPatternAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -49,7 +49,7 @@ using FrontPatternChangeScreen = espgui::makeComponent<
struct BackFreqAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.back.command.buzzer.freq; } };
using BackFreqChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_BACKFREQ>,
espgui::StaticTitle<TEXT_BACKFREQ>,
BackFreqAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -58,7 +58,7 @@ using BackFreqChangeScreen = espgui::makeComponent<
struct BackPatternAccessor : public espgui::RefAccessor<uint8_t> { uint8_t &getRef() const override { return controllers.back.command.buzzer.pattern; } };
using BackPatternChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_BACKPATTERN>,
espgui::StaticTitle<TEXT_BACKPATTERN>,
BackPatternAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -66,28 +66,28 @@ using BackPatternChangeScreen = espgui::makeComponent<
using ReverseBeepFreq0ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_REVERSEBEEPFREQ0>,
espgui::StaticTitle<TEXT_REVERSEBEEPFREQ0>,
ReverseBeepFreq0Accessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using ReverseBeepFreq1ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_REVERSEBEEPFREQ1>,
espgui::StaticTitle<TEXT_REVERSEBEEPFREQ1>,
ReverseBeepFreq1Accessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using ReverseBeepDuration0ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_REVERSEBEEPDURATION0>,
espgui::StaticTitle<TEXT_REVERSEBEEPDURATION0>,
ReverseBeepDuration0Accessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using ReverseBeepDuration1ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_REVERSEBEEPDURATION1>,
espgui::StaticTitle<TEXT_REVERSEBEEPDURATION1>,
ReverseBeepDuration1Accessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -110,7 +110,7 @@ BuzzerMenu::BuzzerMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string BuzzerMenu::text() const
std::string BuzzerMenu::title() const
{
return TEXT_BUZZER;
}

View File

@ -8,7 +8,7 @@ class BuzzerMenu : public BobbyMenuDisplay
public:
BuzzerMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -260,7 +260,7 @@ CanDebugMenu::CanDebugMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string CanDebugMenu::text() const
std::string CanDebugMenu::title() const
{
return TEXT_CANDEBUG;
}

View File

@ -1,5 +1,7 @@
#pragma once
#include "sdkconfig.h"
// local includes
#include "displays/bobbymenudisplay.h"
@ -18,7 +20,7 @@ class CanDebugMenu : public BobbyMenuDisplay
public:
CanDebugMenu();
std::string text() const override;
std::string title() const override;
void update() override;

View File

@ -32,7 +32,7 @@ constexpr char TEXT_BACK[] = "Back";
using CloudURLChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<std::string>,
espgui::StaticText<TEXT_CLOUDURL>,
espgui::StaticTitle<TEXT_CLOUDURL>,
CloudURLAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -40,7 +40,7 @@ using CloudURLChangeScreen = espgui::makeComponent<
using CloudKeyChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<std::string>,
espgui::StaticText<TEXT_CLOUDKEY>,
espgui::StaticTitle<TEXT_CLOUDKEY>,
CloudKeyAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -48,7 +48,7 @@ using CloudKeyChangeScreen = espgui::makeComponent<
using CloudTransmitTimeoutChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_CLOUDTRANSMITTIMEOUT>,
espgui::StaticTitle<TEXT_CLOUDTRANSMITTIMEOUT>,
CloudTransmitTimeoutAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -65,7 +65,7 @@ public:
using CloudCollectRateChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_CLOUDCOLLECTRATE>,
espgui::StaticTitle<TEXT_CLOUDCOLLECTRATE>,
CloudCollectRateAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -73,7 +73,7 @@ using CloudCollectRateChangeDisplay = espgui::makeComponent<
using CloudSendRateChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_CLOUDSENDRATE>,
espgui::StaticTitle<TEXT_CLOUDSENDRATE>,
CloudSendRateAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -98,7 +98,7 @@ CloudSettingsMenu::CloudSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PushScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string CloudSettingsMenu::text() const
std::string CloudSettingsMenu::title() const
{
return TEXT_CLOUDSETTINGS;
}

View File

@ -8,7 +8,7 @@ class CloudSettingsMenu : public BobbyMenuDisplay
public:
CloudSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -39,14 +39,14 @@ constexpr char TEXT_BACK[] = "Back";
using WheelDiameterMmChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_WHEELDIAMETERMM>,
espgui::StaticTitle<TEXT_WHEELDIAMETERMM>,
WheelDiameterMmAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using WheelDiameterInchChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<float>,
espgui::StaticText<TEXT_WHEELDIAMETERINCH>,
espgui::StaticTitle<TEXT_WHEELDIAMETERINCH>,
WheelDiameterInchAccessor,
espgui::RatioNumberStep<float, std::ratio<1,10>>,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
@ -54,7 +54,7 @@ using WheelDiameterInchChangeScreen = espgui::makeComponent<
>;
using NumMagnetPolesChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_NUMMAGNETPOLES>,
espgui::StaticTitle<TEXT_NUMMAGNETPOLES>,
NumMagnetPolesAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -62,14 +62,14 @@ using NumMagnetPolesChangeScreen = espgui::makeComponent<
#ifdef FEATURE_CAN
using CanTransmitTimeoutChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_CANTRANSMITTIMEOUT>,
espgui::StaticTitle<TEXT_CANTRANSMITTIMEOUT>,
CanTransmitTimeoutAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using CanReceiveTimeoutChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_CANRECEIVETIMEOUT>,
espgui::StaticTitle<TEXT_CANRECEIVETIMEOUT>,
CanReceiveTimeoutAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -97,7 +97,7 @@ ControllerHardwareSettingsMenu::ControllerHardwareSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string ControllerHardwareSettingsMenu::text() const
std::string ControllerHardwareSettingsMenu::title() const
{
return TEXT_CONTROLLERHARDWARESETTINGS;
}

View File

@ -8,7 +8,7 @@ class ControllerHardwareSettingsMenu : public BobbyMenuDisplay
public:
ControllerHardwareSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -23,7 +23,7 @@ CrashMenu::CrashMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string CrashMenu::text() const
std::string CrashMenu::title() const
{
return TEXT_CRASHMENU;
}

View File

@ -8,7 +8,7 @@ class CrashMenu : public BobbyMenuDisplay
public:
CrashMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -118,7 +118,7 @@ DebugMenu::DebugMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string DebugMenu::text() const
std::string DebugMenu::title() const
{
return TEXT_DEBUG;
}

View File

@ -8,7 +8,7 @@ class DebugMenu : public BobbyMenuDisplay
public:
DebugMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -46,70 +46,70 @@ constexpr char TEXT_BACK[] = "Back";
using DefaultModeModelModeChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<UnifiedModelMode>,
espgui::StaticText<TEXT_MODELMODE>,
espgui::StaticTitle<TEXT_MODELMODE>,
DefaultModeModelModeAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeSmoothingChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SMOOTHINGVAL>,
espgui::StaticTitle<TEXT_SMOOTHINGVAL>,
DefaultModeSmoothingAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeFwSmoothingLowerLimitChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_FWSMOOTHING_LIMIT>,
espgui::StaticTitle<TEXT_FWSMOOTHING_LIMIT>,
DefaultModeEnableFieldWeakSmoothingLowerLimitAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeFrontPercentageChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_FRONTPERCENTAGE>,
espgui::StaticTitle<TEXT_FRONTPERCENTAGE>,
DefaultModeFrontPercentageAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeBackPercentageChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_BACKPERCENTAGE>,
espgui::StaticTitle<TEXT_BACKPERCENTAGE>,
DefaultModeBackPercentageAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeAddSchwelleChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_ADDSCHWELLE>,
espgui::StaticTitle<TEXT_ADDSCHWELLE>,
DefaultModeAddSchwelleAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeGas1WertChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_ADDGASVAL>,
espgui::StaticTitle<TEXT_ADDGASVAL>,
DefaultModeGas1WertAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeGas2WertChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SUBGASVAL>,
espgui::StaticTitle<TEXT_SUBGASVAL>,
DefaultModeGas2WertAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeBrems1WertChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_ADDBRAKEVAL>,
espgui::StaticTitle<TEXT_ADDBRAKEVAL>,
DefaultModeBrems1WertAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using DefaultModeBrems2WertChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SUBBRAKEVAL>,
espgui::StaticTitle<TEXT_SUBBRAKEVAL>,
DefaultModeBrems2WertAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>

View File

@ -32,7 +32,7 @@ DemosMenu::DemosMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string DemosMenu::text() const
std::string DemosMenu::title() const
{
return TEXT_DEMOS;
}

View File

@ -8,7 +8,7 @@ class DemosMenu : public BobbyMenuDisplay
public:
DemosMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -69,7 +69,7 @@ private:
class RandomIcon : public virtual MenuItemIconInterface
{
public:
const MenuItemIcon *icon() const override;
const MenuItemIcon *icon(bool selected) const override;
private:
mutable std::optional<espchrono::millis_clock::time_point> m_nextUpdate;
@ -91,7 +91,7 @@ public:
using ToggleChangeValueDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<bool>,
espgui::StaticText<TEXT_DEBUGTOGGLEMENU>,
espgui::StaticTitle<TEXT_DEBUGTOGGLEMENU>,
ToggleAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -185,7 +185,7 @@ int RandomFont::font() const
return m_font;
}
const MenuItemIcon *RandomIcon::icon() const
const MenuItemIcon *RandomIcon::icon(bool selected) const
{
const auto now = espchrono::millis_clock::now();
if (!m_nextUpdate || now >= *m_nextUpdate)

View File

@ -25,7 +25,7 @@ EnableMenu::EnableMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string EnableMenu::text() const
std::string EnableMenu::title() const
{
return TEXT_SETENABLED;
}

View File

@ -8,7 +8,7 @@ class EnableMenu : public BobbyMenuDisplay
public:
EnableMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -65,7 +65,7 @@ EspNowMenu::EspNowMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PushScreenAction<SettingsMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string EspNowMenu::text() const
std::string EspNowMenu::title() const
{
return TEXT_ESPNOW_MENU;
}

View File

@ -8,7 +8,7 @@ class EspNowMenu : public BobbyMenuDisplay
public:
EspNowMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -27,7 +27,7 @@ EspNowSettingsMenu::EspNowSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string EspNowSettingsMenu::text() const
std::string EspNowSettingsMenu::title() const
{
return TEXT_ESPNOW_SETTINGS;
}

View File

@ -8,7 +8,7 @@ class EspNowSettingsMenu : public BobbyMenuDisplay
public:
EspNowSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -242,7 +242,7 @@ void ExtraButtonCalibrateMenu::buttonPressed(espgui::Button button)
}
}
std::string ExtraButtonCalibrateMenu::text() const
std::string ExtraButtonCalibrateMenu::title() const
{
return TEXT_EXTRABUTTONCALIBRATEMENU;
}

View File

@ -30,7 +30,7 @@ class ExtraButtonCalibrateMenu :
using Base = BobbyMenuDisplay;
public:
ExtraButtonCalibrateMenu();
std::string text() const override;
std::string title() const override;
void back() override;
void start() override;

View File

@ -10,6 +10,7 @@
#include "debugtexthelpers.h"
#include "debugcolorhelpers.h"
#include "displays/menus/debugmenu.h"
#include <tftcolors.h>
template<const char *Ttext, typename Ttexts, template<int> class ColorInterface>
class FeedbackDebugMenu :
@ -21,11 +22,11 @@ public:
FeedbackDebugMenu()
{
using namespace espgui;
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::BatVoltageText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::BatVoltageFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
//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, typename Ttexts::BatVoltageText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::BatVoltageFixedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::BoardTempText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::BoardTempFixedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::TimeoutCntSerialText, StaticFont<2>, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}

View File

@ -44,7 +44,7 @@ GarageMenu::GarageMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string GarageMenu::text() const
std::string GarageMenu::title() const
{
return TEXT_GARAGE;
}

View File

@ -8,7 +8,7 @@ class GarageMenu : public BobbyMenuDisplay
public:
GarageMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -63,7 +63,7 @@ GitMenu::GitMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string GitMenu::text() const
std::string GitMenu::title() const
{
return TEXT_GIT;
}

View File

@ -8,7 +8,7 @@ class GitMenu : public bobbygui::MenuDisplayWithTime
public:
GitMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -213,7 +213,7 @@ GraphsMenu::GraphsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string GraphsMenu::text() const
std::string GraphsMenu::title() const
{
return TEXT_GRAPHS;
}

View File

@ -8,7 +8,7 @@ class GraphsMenu : public BobbyMenuDisplay
public:
GraphsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -89,7 +89,7 @@ GreenPassMenu::GreenPassMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string GreenPassMenu::text() const
std::string GreenPassMenu::title() const
{
return TEXT_GREENPASS;
}

View File

@ -8,7 +8,7 @@ class GreenPassMenu : public BobbyMenuDisplay
public:
GreenPassMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -26,7 +26,7 @@ constexpr char TEXT_BACK[] = "Back";
using HandBremsTriggerTimeoutChangeValueDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<uint16_t>,
espgui::StaticText<TEXT_HANDBREMSE_TRIGGERTIMEOUT>,
espgui::StaticTitle<TEXT_HANDBREMSE_TRIGGERTIMEOUT>,
HandbremsTimeoutAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -44,7 +44,7 @@ HandbremsSettingsMenu::HandbremsSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string HandbremsSettingsMenu::text() const
std::string HandbremsSettingsMenu::title() const
{
return TEXT_HANDBREMSE;
}

View File

@ -8,7 +8,7 @@ class HandbremsSettingsMenu : public BobbyMenuDisplay
public:
HandbremsSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -25,7 +25,7 @@ InvertMenu::InvertMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string InvertMenu::text() const
std::string InvertMenu::title() const
{
return TEXT_SETINVERTED;
}

View File

@ -8,7 +8,7 @@ class InvertMenu : public BobbyMenuDisplay
public:
InvertMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -23,21 +23,21 @@ constexpr char TEXT_BACK[] = "Back";
using LarsmModeModelModeChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<UnifiedModelMode>,
espgui::StaticText<TEXT_MODELMODE>,
espgui::StaticTitle<TEXT_MODELMODE>,
LarsmModeModelModeAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using LarsmModeModeChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<LarsmModeMode>,
espgui::StaticText<TEXT_SETMODE>,
espgui::StaticTitle<TEXT_SETMODE>,
LarsmModeModeAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using LarsmModeIterationsChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_SETITERATIONS>,
espgui::StaticTitle<TEXT_SETITERATIONS>,
LarsmModeIterationsAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>

View File

@ -54,7 +54,7 @@ constexpr char TEXT_BACK[] = "Back";
using LedsCountChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_LEDSCOUNT>,
espgui::StaticTitle<TEXT_LEDSCOUNT>,
LedsCountAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -62,7 +62,7 @@ using LedsCountChangeScreen = espgui::makeComponent<
using CenterOffsetChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_CENTEROFFSET>,
espgui::StaticTitle<TEXT_CENTEROFFSET>,
CenterOffsetAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -70,7 +70,7 @@ using CenterOffsetChangeScreen = espgui::makeComponent<
using SmallOffsetChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_SMALLOFFSET>,
espgui::StaticTitle<TEXT_SMALLOFFSET>,
SmallOffsetAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -78,7 +78,7 @@ using SmallOffsetChangeScreen = espgui::makeComponent<
using BigOffsetChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_BIGOFFSET>,
espgui::StaticTitle<TEXT_BIGOFFSET>,
BigOffsetAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -86,7 +86,7 @@ using BigOffsetChangeScreen = espgui::makeComponent<
using LedStripMaxAmpereChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<float>,
espgui::StaticText<TEXT_LEDSTRIPCURRENTLIMIT>,
espgui::StaticTitle<TEXT_LEDSTRIPCURRENTLIMIT>,
LedStripMaxAmpereAccessor,
espgui::RatioNumberStep<float, std::ratio<1,10>>,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
@ -95,7 +95,7 @@ using LedStripMaxAmpereChangeScreen = espgui::makeComponent<
using StVOOffsetChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_STVO_FRONTOFFSET>,
espgui::StaticTitle<TEXT_STVO_FRONTOFFSET>,
LedsStVOFrontOffsetAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -103,7 +103,7 @@ using StVOOffsetChangeScreen = espgui::makeComponent<
using StVOLengthChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_STVO_FRONTLENGTH>,
espgui::StaticTitle<TEXT_STVO_FRONTLENGTH>,
LedsStVOFrontLengthAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -111,7 +111,7 @@ using StVOLengthChangeScreen = espgui::makeComponent<
using AnimationMultiplierChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_ANIMATION_MULTIPLIER>,
espgui::StaticTitle<TEXT_ANIMATION_MULTIPLIER>,
AnimationMultiplierAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -119,7 +119,7 @@ using AnimationMultiplierChangeScreen = espgui::makeComponent<
using LedStripBrightnessChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_LEDSTRIP_BRIGHTNESS>,
espgui::StaticTitle<TEXT_LEDSTRIP_BRIGHTNESS>,
LedstripBrightnessAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -186,7 +186,7 @@ LedstripMenu::LedstripMenu()
constructMenuItem<makeComponent<MenuItem, espgui::StaticText<TEXT_BACK>, espgui::PushScreenAction<MainMenu>, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string LedstripMenu::text() const
std::string LedstripMenu::title() const
{
return TEXT_LEDSTRIP;
}

View File

@ -8,7 +8,7 @@ class LedstripMenu : public bobbygui::MenuDisplayWithTime
public:
LedstripMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -44,7 +44,7 @@ LedstripSelectBlinkMenu::LedstripSelectBlinkMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string LedstripSelectBlinkMenu::text() const
std::string LedstripSelectBlinkMenu::title() const
{
return TEXT_BLINKANIMATION;
}

View File

@ -8,6 +8,6 @@ class LedstripSelectBlinkMenu : public BobbyMenuDisplay
public:
LedstripSelectBlinkMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -37,7 +37,7 @@ LedstripOtaAnimationChangeMenu::LedstripOtaAnimationChangeMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string LedstripOtaAnimationChangeMenu::text() const
std::string LedstripOtaAnimationChangeMenu::title() const
{
return TEXT_BLINKANIMATION;
}

View File

@ -8,6 +8,6 @@ class LedstripOtaAnimationChangeMenu : public BobbyMenuDisplay
public:
LedstripOtaAnimationChangeMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -25,42 +25,42 @@ constexpr char TEXT_BACK[] = "Back";
using IMotMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_IMOTMAX>,
espgui::StaticTitle<TEXT_IMOTMAX>,
IMotMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using IDcMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_IDCMAX>,
espgui::StaticTitle<TEXT_IDCMAX>,
IDcMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using NMotMaxKmhChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_NMOTMAXKMH>,
espgui::StaticTitle<TEXT_NMOTMAXKMH>,
NMotMaxKmhAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using NMotMaxRpmChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_NMOTMAX>,
espgui::StaticTitle<TEXT_NMOTMAX>,
NMotMaxRpmAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using FieldWeakMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_FIELDWEAKMAX>,
espgui::StaticTitle<TEXT_FIELDWEAKMAX>,
FieldWeakMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using PhaseAdvMaxChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int16_t>,
espgui::StaticText<TEXT_PHASEADVMAX>,
espgui::StaticTitle<TEXT_PHASEADVMAX>,
PhaseAdvMaxAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -80,7 +80,7 @@ LimitsSettingsMenu::LimitsSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string LimitsSettingsMenu::text() const
std::string LimitsSettingsMenu::title() const
{
return TEXT_LIMITSSETTINGS;
}

View File

@ -8,7 +8,7 @@ class LimitsSettingsMenu : public BobbyMenuDisplay
public:
LimitsSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -26,7 +26,7 @@ constexpr char TEXT_BACK[] = "Back";
using LockscreenPinDigit0ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int8_t>,
espgui::StaticText<TEXT_PINDIGIT0>,
espgui::StaticTitle<TEXT_PINDIGIT0>,
LockscreenPinDigitAccessor<0>,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -34,7 +34,7 @@ using LockscreenPinDigit0ChangeScreen = espgui::makeComponent<
using LockscreenPinDigit1ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int8_t>,
espgui::StaticText<TEXT_PINDIGIT1>,
espgui::StaticTitle<TEXT_PINDIGIT1>,
LockscreenPinDigitAccessor<1>,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -42,7 +42,7 @@ using LockscreenPinDigit1ChangeScreen = espgui::makeComponent<
using LockscreenPinDigit2ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int8_t>,
espgui::StaticText<TEXT_PINDIGIT2>,
espgui::StaticTitle<TEXT_PINDIGIT2>,
LockscreenPinDigitAccessor<2>,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -50,7 +50,7 @@ using LockscreenPinDigit2ChangeScreen = espgui::makeComponent<
using LockscreenPinDigit3ChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<int8_t>,
espgui::StaticText<TEXT_PINDIGIT3>,
espgui::StaticTitle<TEXT_PINDIGIT3>,
LockscreenPinDigitAccessor<3>,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -69,7 +69,7 @@ LockscreenSettingsMenu::LockscreenSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string LockscreenSettingsMenu::text() const
std::string LockscreenSettingsMenu::title() const
{
return TEXT_LOCKSCREENSETTINGS;
}

View File

@ -8,7 +8,7 @@ class LockscreenSettingsMenu : public BobbyMenuDisplay
public:
LockscreenSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -252,7 +252,7 @@ void ManageProfilesMenu::stop()
}
}
std::string ManageProfilesMenu::text() const
std::string ManageProfilesMenu::title() const
{
return TEXT_MANAGEPROFILESMENU;
}

View File

@ -24,7 +24,7 @@ public:
void start() override;
void stop() override;
std::string text() const override;
std::string title() const override;
std::string action_text() const;
void lock();
void unlock();

View File

@ -20,14 +20,14 @@ constexpr char TEXT_BACK[] = "Back";
using MickModeModelModeChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<UnifiedModelMode>,
espgui::StaticText<TEXT_MODELMODE>,
espgui::StaticTitle<TEXT_MODELMODE>,
MickModeModelModeAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
>;
using MickModeSmoothingChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<uint16_t>,
espgui::StaticText<TEXT_MICKMODE_SMOOTHING>,
espgui::StaticTitle<TEXT_MICKMODE_SMOOTHING>,
MickModeSmoothingAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>

View File

@ -35,7 +35,7 @@ ModesSettingsMenu::ModesSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string ModesSettingsMenu::text() const
std::string ModesSettingsMenu::title() const
{
return TEXT_MODESSETTINGS;
}

View File

@ -8,7 +8,7 @@ class ModesSettingsMenu : public BobbyMenuDisplay
public:
ModesSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -42,7 +42,7 @@ MosfetsMenu::MosfetsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string MosfetsMenu::text() const
std::string MosfetsMenu::title() const
{
return TEXT_MOSFETS;
}

View File

@ -10,7 +10,7 @@ class MosfetsMenu : public BobbyMenuDisplay
public:
MosfetsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -9,6 +9,7 @@
#include "icons/back.h"
#include "debugtexthelpers.h"
#include "debugcolorhelpers.h"
#include <tftcolors.h>
template<const char *Ttext, typename Ttexts, template<int> class ColorInterface>
class MotorFeedbackDebugMenu :
@ -21,22 +22,22 @@ public:
{
using namespace espgui;
constructMenuItem<makeComponent<MenuItem, typename Ttexts::AngleText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::SpeedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::SpeedKmhText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::ErrorText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcLinkText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcLinkFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaAText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaAFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaBText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaBFixedText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaCText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
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, typename Ttexts::IqText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::IdText, ColorInterface<TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::AngleText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::SpeedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::SpeedKmhText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::ErrorText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcLinkText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcLinkFixedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaAText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaAFixedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaBText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaBFixedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
//constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaCText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::DcPhaCFixedText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::ChopsText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::HallText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::IqText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, typename Ttexts::IdText, ColorInterface<espgui::TFT_DARKGREY>, DummyAction>>();
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}

View File

@ -20,7 +20,7 @@ constexpr char TEXT_BACK[] = "Back";
using MotortestMultiplikatorChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<uint8_t>,
espgui::StaticText<TEXT_MOTORTESTMULTIPLIKATOR>,
espgui::StaticTitle<TEXT_MOTORTESTMULTIPLIKATOR>,
MotortestModeMultiplikatorAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -28,7 +28,7 @@ using MotortestMultiplikatorChangeDisplay = espgui::makeComponent<
using MotortestMaxPwmChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<uint16_t>,
espgui::StaticText<TEXT_MOTORTESTMAXPWM>,
espgui::StaticTitle<TEXT_MOTORTESTMAXPWM>,
MotortestMaxPwmAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>

View File

@ -40,7 +40,7 @@ NetworkSettingsMenu::NetworkSettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&icons::back>>>();
}
std::string NetworkSettingsMenu::text() const
std::string NetworkSettingsMenu::title() const
{
return "Network settings";
}

View File

@ -8,7 +8,7 @@ class NetworkSettingsMenu : public BobbyMenuDisplay
public:
NetworkSettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -34,7 +34,7 @@ OtaMenu::OtaMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string OtaMenu::text() const
std::string OtaMenu::title() const
{
return TEXT_UPDATE;
}

View File

@ -8,7 +8,7 @@ class OtaMenu : public BobbyMenuDisplay
public:
OtaMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -24,7 +24,7 @@ ProfilesMenu::ProfilesMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string ProfilesMenu::text() const
std::string ProfilesMenu::title() const
{
return TEXT_PROFILES;
}

View File

@ -8,7 +8,7 @@ class ProfilesMenu : public BobbyMenuDisplay
public:
ProfilesMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -54,7 +54,7 @@ RecoveryMenu::RecoveryMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_REBOOT>, RebootAction, StaticMenuItemIcon<&bobbyicons::reboot>>>();
}
std::string RecoveryMenu::text() const
std::string RecoveryMenu::title() const
{
return "Recovery Menu";
}

View File

@ -9,7 +9,7 @@ class RecoveryMenu : public BobbyMenuDisplay
public:
RecoveryMenu();
std::string text() const override;
std::string title() const override;
void back() override {}

View File

@ -19,7 +19,7 @@ namespace {
using RemoteControlModeModelModeChangeDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<UnifiedModelMode>,
espgui::StaticText<TEXT_MODELMODE>,
espgui::StaticTitle<TEXT_MODELMODE>,
RemoteControlModeModelModeAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>

View File

@ -113,7 +113,7 @@ SelectBuildserverBranchMenu::SelectBuildserverBranchMenu()
SelectBranch::start_descriptor_request(configs.otaServerUrl.value());
}
std::string SelectBuildserverBranchMenu::text() const
std::string SelectBuildserverBranchMenu::title() const
{
return TEXT_SELECT_BRANCH;
}

View File

@ -9,7 +9,7 @@ class SelectBuildserverBranchMenu : public BobbyMenuDisplay
public:
SelectBuildserverBranchMenu();
std::string text() const override;
std::string title() const override;
void update() override;
void back() override;

View File

@ -71,7 +71,7 @@ SelectBuildServerMenu::SelectBuildServerMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string SelectBuildServerMenu::text() const
std::string SelectBuildServerMenu::title() const
{
return TEXT_SELECTBUILDSERVERMENU;
}

View File

@ -10,7 +10,7 @@ class SelectBuildServerMenu : public BobbyMenuDisplay
public:
SelectBuildServerMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -76,7 +76,7 @@ SelectModeMenu::SelectModeMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string SelectModeMenu::text() const
std::string SelectModeMenu::title() const
{
return TEXT_SELECTMODE;
}

View File

@ -10,7 +10,7 @@ class SelectModeMenu : public BobbyMenuDisplay
public:
SelectModeMenu();
std::string text() const override;
std::string title() const override;
void start() override;
void back() override;

View File

@ -99,7 +99,7 @@ SelectBuildMenu::SelectBuildMenu()
}
}
std::string SelectBuildMenu::text() const
std::string SelectBuildMenu::title() const
{
return TEXT_SELECTBUILD;
}

View File

@ -10,7 +10,7 @@ class SelectBuildMenu : public BobbyMenuDisplay
public:
SelectBuildMenu();
std::string text() const override;
std::string title() const override;
void update() override;
void back() override;

View File

@ -78,7 +78,7 @@ struct BackLedAccessor : public espgui::RefAccessor<bool> { bool &getRef() const
using AnhaengerIdChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<uint16_t>,
espgui::StaticText<TEXT_ANHAENGER_ID>,
espgui::StaticTitle<TEXT_ANHAENGER_ID>,
AnhaengerIdAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -86,7 +86,7 @@ using AnhaengerIdChangeScreen = espgui::makeComponent<
using UsernameChangeScreen = espgui::makeComponent<
BobbyChangeValueDisplay<std::string>,
espgui::StaticText<TEXT_USERNAME>,
espgui::StaticTitle<TEXT_USERNAME>,
UsernameAccessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -139,7 +139,7 @@ SettingsMenu::SettingsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string SettingsMenu::text() const
std::string SettingsMenu::title() const
{
return TEXT_SETTINGS;
}

View File

@ -8,7 +8,7 @@ class SettingsMenu : public bobbygui::MenuDisplayWithTime
public:
SettingsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -27,7 +27,7 @@ constexpr char TEXT_BACK[] = "Back";
template<typename Tvalue, const char* TEXT, typename Accessor>
using QuickActionChangeValueDisplay = espgui::makeComponent<
BobbyChangeValueDisplay<Tvalue>,
espgui::StaticText<TEXT>,
espgui::StaticTitle<TEXT>,
Accessor,
espgui::ConfirmActionInterface<espgui::PopScreenAction>,
espgui::BackActionInterface<espgui::PopScreenAction>
@ -49,7 +49,7 @@ SetupQuickActionsMenu::SetupQuickActionsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string SetupQuickActionsMenu::text() const
std::string SetupQuickActionsMenu::title() const
{
return TEXT_SETUPQUICKACTIONS;
}

View File

@ -8,7 +8,7 @@ class SetupQuickActionsMenu : public BobbyMenuDisplay
public:
SetupQuickActionsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -189,7 +189,7 @@ StatisticsMenu::StatisticsMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string StatisticsMenu::text() const
std::string StatisticsMenu::title() const
{
return TEXT_STATISTICSMENU;
}

View File

@ -8,7 +8,7 @@ class StatisticsMenu : public bobbygui::MenuDisplayWithTime
public:
StatisticsMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

View File

@ -40,7 +40,7 @@ TaskmanagerMenu::TaskmanagerMenu()
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
}
std::string TaskmanagerMenu::text() const
std::string TaskmanagerMenu::title() const
{
return TEXT_TASKMANAGER;
}

View File

@ -8,7 +8,7 @@ class TaskmanagerMenu : public BobbyMenuDisplay
public:
TaskmanagerMenu();
std::string text() const override;
std::string title() const override;
void back() override;
};

Some files were not shown because too many files have changed in this diff Show More