moved pid settings to menuIntInput
This commit is contained in:
@@ -12,17 +12,15 @@
|
||||
#ifndef PID_SETTINGS_H
|
||||
#define PID_SETTINGS_H
|
||||
|
||||
#include "menuControl.h"
|
||||
#include "menuIntInput.h"
|
||||
#include <PID_v1.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define NUM_VAL 3
|
||||
|
||||
/**
|
||||
* @brief A class to tune the PID settings
|
||||
*
|
||||
*/
|
||||
class MenuPidSettings : public MenuControl {
|
||||
class MenuPidSettings : public MenuIntInputWrapper {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Menu Pid Settings object
|
||||
@@ -31,50 +29,10 @@ class MenuPidSettings : public MenuControl {
|
||||
*/
|
||||
MenuPidSettings(PID* pid);
|
||||
|
||||
/**
|
||||
* @brief Decrement selected value
|
||||
*/
|
||||
void down() override;
|
||||
|
||||
/**
|
||||
* @brief Increment selected value
|
||||
*/
|
||||
void up() override;
|
||||
|
||||
/**
|
||||
* @brief Select next value
|
||||
*/
|
||||
void right() override;
|
||||
|
||||
/**
|
||||
* @brief Select previous value
|
||||
*/
|
||||
void left() override;
|
||||
|
||||
/**
|
||||
* @brief Leave menu without saving
|
||||
*/
|
||||
void no() override;
|
||||
|
||||
/**
|
||||
* @brief Leave menu with saving
|
||||
*/
|
||||
void yes() override;
|
||||
|
||||
/**
|
||||
* @brief Prints the Information to display and console
|
||||
*
|
||||
* The informations are only printed to the display if it
|
||||
* set.
|
||||
*/
|
||||
void printMenu() override;
|
||||
|
||||
void update() override {};
|
||||
void action(int16_t* values, uint8_t length);
|
||||
|
||||
private:
|
||||
PID* pid;
|
||||
uint8_t values[NUM_VAL];
|
||||
uint8_t curPos = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user