Files
Bachelorarbeit-Rover/src/SpecialMenus/PID/menuPidSettings.h
T

82 lines
1.5 KiB
C++

/**
* @file menuPidSettings.h
* @author Alexander Klein (alex@kleiax.de)
* @brief Contains a class to tune the PID settings
* @version 0.1
* @date 2022-01-19
*
* @copyright Copyright (c) 2022
*
*/
#ifndef PID_SETTINGS_H
#define PID_SETTINGS_H
#include "menuControl.h"
#include <PID_v1.h>
#include <stdint.h>
#define NUM_VAL 3
/**
* @brief A class to tune the PID settings
*
*/
class MenuPidSettings : public MenuControl {
public:
/**
* @brief Construct a new Menu Pid Settings object
*
* @param pid
*/
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 {};
private:
PID* pid;
uint8_t values[NUM_VAL];
uint8_t curPos = 0;
};
#endif // PID_SETTINGS_H