rk3399_arm_lvds/motorcontroller/Selectable.h

55 lines
914 B
C
Raw Permalink Normal View History

2024-03-05 03:46:18 +00:00
#pragma once
#include <iostream>
#include <string>
#include <memory>
#include <vector>
#include <functional>
#include "Displaydef.h"
using namespace std;
class Selectable
{
public:
enum class SettingType
{
Set_ClearPass = 1,
Set_Sleep,
Set_FeedStrength,
Set_Poweroff,
Set_ClearCount,
Set_CountMode,
Set_DoubleEn
};
enum class SleepTime
{
Sleep_15min = 1,
Sleep_30min,
Sleep_60min,
Sleep_120min,
Sleep_never
};
enum class MtStrength
{
Strength_Low = 1,
Strength_Mid,
Strength_High
};
Selectable() {}
virtual ~Selectable() {}
virtual string get_name() = 0;
virtual int select() = 0;
void setconfirmcall(std::function<void()> confirmcall)
{
g_call = confirmcall;
}
protected:
std::function<void()> g_call;
};