58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
/**
|
|
* @file menuTestMode.h
|
|
* @author Alexander Klein (alex@kleiax.de)
|
|
* @brief
|
|
* @version 0.1
|
|
* @date 2022-09-08
|
|
*
|
|
* @copyright Copyright (c) 2022
|
|
*
|
|
*/
|
|
#ifndef MENU_TEST_MODE
|
|
#define MENU_TEST_MODE
|
|
|
|
#include "SpecialMenus/driveModi/menuDriveMode.h"
|
|
#include "driveModi/Modi/TestMode/testMode.h"
|
|
#include "menu.h"
|
|
#include "menuAction.h"
|
|
#include "menuIntInput.h"
|
|
|
|
class MenuTestMode : public MenuDriveMode {
|
|
public:
|
|
MenuTestMode(DriveManager *driveManager);
|
|
~MenuTestMode();
|
|
void printMenu();
|
|
|
|
void down() override;
|
|
void up() override;
|
|
void right() override;
|
|
void left() override;
|
|
void yes() override;
|
|
void no() override;
|
|
|
|
private:
|
|
void init();
|
|
|
|
TestMode* testMode;
|
|
Menu* mainMenu;
|
|
|
|
bool isInit = false;
|
|
};
|
|
|
|
typedef bool (TestMode::*TestModeFunctionSingle)(int16_t);
|
|
typedef bool (TestMode::*TestModeFunctionDouble)(int16_t, int16_t);
|
|
class MenuTestModeWrapper : public MenuIntInputWrapper {
|
|
public:
|
|
MenuTestModeWrapper(TestMode* testMode, TestModeFunctionSingle testModeFunction);
|
|
MenuTestModeWrapper(TestMode* testMode, TestModeFunctionDouble testModeFunction);
|
|
|
|
void action(int16_t* values, uint8_t length) override;
|
|
|
|
private:
|
|
TestMode* testMode;
|
|
TestModeFunctionSingle testModeFunctionSingle = nullptr;
|
|
TestModeFunctionDouble testModeFunctionDouble = nullptr;
|
|
};
|
|
|
|
#endif // MENU_TEST_MODE
|