51 lines
1.0 KiB
C++
51 lines
1.0 KiB
C++
/**
|
|
* @file menuCalibrateBattery.h
|
|
* @author Alexander Klein (alex@kleiax.de)
|
|
* @brief Contains a Menu class to calibrate the Battery class
|
|
* @version 0.1
|
|
* @date 2023-09-26
|
|
*
|
|
* @copyright Copyright (c) 2023
|
|
*
|
|
*/
|
|
|
|
#ifndef MENU_CALIBRATE_BATTERY_H
|
|
#define MENU_CALIBRATE_BATTERY_H
|
|
|
|
#include "menuControl.h"
|
|
#include "battery.h"
|
|
|
|
/**
|
|
* @brief A Menu class to calibrate the Battery class
|
|
*/
|
|
class MenuCalibrateBattery : public MenuControl
|
|
{
|
|
public:
|
|
/**
|
|
* @brief Construct a new MenuCalibrateBattery object
|
|
*
|
|
* Prepare the calibration.
|
|
*
|
|
* @param battery
|
|
*/
|
|
MenuCalibrateBattery(Battery *battery);
|
|
|
|
/**
|
|
* @brief Prints the instructions for the calibration
|
|
*/
|
|
void printMenu() override;
|
|
|
|
// User Inputs
|
|
void left() override;
|
|
void no() override { this->left(); }
|
|
void right() override;
|
|
void yes() override { this->right(); }
|
|
|
|
private:
|
|
Battery *battery;
|
|
|
|
static constexpr uint16_t updateDelay = 400;
|
|
};
|
|
|
|
#endif // MENU_CALIBRATE_BATTERY_H
|