47 lines
1015 B
C++
47 lines
1015 B
C++
#pragma once
|
|
|
|
// local includes
|
|
#include "displays/bobbymenudisplay.h"
|
|
#include "modeinterface.h"
|
|
#include "modes/ignoreinputmode.h"
|
|
|
|
namespace {
|
|
enum Status : uint8_t
|
|
{
|
|
Idle,
|
|
WaitingLeft2,
|
|
WaitingRight2,
|
|
WaitingUp2,
|
|
WaitingDown2,
|
|
WaitingProfile0,
|
|
WaitingProfile1,
|
|
WaitingProfile2,
|
|
WaitingProfile3,
|
|
WaitingExtra1,
|
|
WaitingExtra2,
|
|
WaitingExtra3,
|
|
WaitingExtra4,
|
|
};
|
|
} // namespace
|
|
|
|
class ExtraButtonCalibrateMenu :
|
|
public BobbyMenuDisplay
|
|
{
|
|
using Base = BobbyMenuDisplay;
|
|
public:
|
|
ExtraButtonCalibrateMenu();
|
|
std::string title() const override;
|
|
void back() override;
|
|
|
|
void start() override;
|
|
void stop() override;
|
|
|
|
void rawButtonPressed(uint8_t button) override;
|
|
void buttonPressed(espgui::Button button) override;
|
|
|
|
private:
|
|
ModeInterface *m_oldMode;
|
|
IgnoreInputMode m_mode{0, bobbycar::protocol::ControlType::FieldOrientedControl, bobbycar::protocol::ControlMode::Torque};
|
|
bool validateNewButton(uint8_t button);
|
|
};
|