Utility library for multiple control sources (e.g. PC).
PcControls.h
- Committer:
- jurgy
- Date:
- 2016-01-06
- Revision:
- 2:f3dbcaf26222
- Parent:
- 1:39cb90d4bbed
- Child:
- 3:8f13d2dafaed
File content as of revision 2:f3dbcaf26222:
#ifndef PCCONTROLS_H #define PCCONTROLS_H #include "mbed.h" #include "MotorController.h" class MotorControlsPc { public: MotorControlsPc(MotorController &motorController); void ProcessPcInput(char c); private: static const char MOTOR_POSITION_0 = '0'; static const char MOTOR_POSITION_1 = '1'; static const char MOTOR_POSITION_2 = '2'; static const char MOTOR_POSITION_3 = '3'; static const char MOTOR_POSITION_4 = '4'; static const char MOTOR_POSITION_5 = '5'; static const char MOTOR_POSITION_6 = '6'; static const char MOTOR_POSITION_7 = '7'; static const char MOTOR_POSITION_8 = '8'; static const char MOTOR_POSITION_9 = '9'; static const char MOTOR_POSITION_10 = '-'; static const char MOTOR_START = 's'; static const char MOTOR_FORWARD = 'f'; static const char MOTOR_BACKWARD = 'b'; static const char MOTOR_POSITION = 'p'; MotorController &motorController; }; #endif