Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Committer:
jmarkel44
Date:
Wed Sep 21 12:54:41 2016 +0000
Revision:
96:807f04bd5256
Child:
97:5cf6ab71dcd0
added tolerance to the setpoint control;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jmarkel44 96:807f04bd5256 1 /******************************************************************************
jmarkel44 96:807f04bd5256 2 *
jmarkel44 96:807f04bd5256 3 * File: ManualControl.h
jmarkel44 96:807f04bd5256 4 * Desciption: ICE Manual Control Class
jmarkel44 96:807f04bd5256 5 *
jmarkel44 96:807f04bd5256 6 *****************************************************************************/
jmarkel44 96:807f04bd5256 7 #ifndef MANUALCONTROL_H
jmarkel44 96:807f04bd5256 8 #define MANUALCONTROL_H
jmarkel44 96:807f04bd5256 9
jmarkel44 96:807f04bd5256 10 #include <string>
jmarkel44 96:807f04bd5256 11
jmarkel44 96:807f04bd5256 12 using namespace std;
jmarkel44 96:807f04bd5256 13
jmarkel44 96:807f04bd5256 14 class ManualControl
jmarkel44 96:807f04bd5256 15 {
jmarkel44 96:807f04bd5256 16 private:
jmarkel44 96:807f04bd5256 17 string controlFile; // name of the control file
jmarkel44 96:807f04bd5256 18 string id; // identifier
jmarkel44 96:807f04bd5256 19 unsigned int type; // timed, continuous, setpoint
jmarkel44 96:807f04bd5256 20 unsigned int priority; // control priority
jmarkel44 96:807f04bd5256 21 unsigned int duration;
jmarkel44 96:807f04bd5256 22 float setpoint;
jmarkel44 96:807f04bd5256 23 enum State { OFF = 0, ON = 1 } ;
jmarkel44 96:807f04bd5256 24 State state;
jmarkel44 96:807f04bd5256 25 unsigned int percent; // analog/manual value
jmarkel44 96:807f04bd5256 26
jmarkel44 96:807f04bd5256 27 public:
jmarkel44 96:807f04bd5256 28 ManualControl() {};
jmarkel44 96:807f04bd5256 29 ~ManualControl() {
jmarkel44 96:807f04bd5256 30 printf("\r%s destructor invoked\n", __func__);
jmarkel44 96:807f04bd5256 31 }
jmarkel44 96:807f04bd5256 32 // load a control from the control file
jmarkel44 96:807f04bd5256 33 bool load(string filename);
jmarkel44 96:807f04bd5256 34 string getControlFile(void) const {
jmarkel44 96:807f04bd5256 35 return controlFile;
jmarkel44 96:807f04bd5256 36 }
jmarkel44 96:807f04bd5256 37
jmarkel44 96:807f04bd5256 38 int start(void);
jmarkel44 96:807f04bd5256 39 int update(void);
jmarkel44 96:807f04bd5256 40 int unregisterControl();
jmarkel44 96:807f04bd5256 41 void display(void);
jmarkel44 96:807f04bd5256 42 };
jmarkel44 96:807f04bd5256 43
jmarkel44 96:807f04bd5256 44 #endif