Utility library for multiple control sources (e.g. PC).
PcControls.h
- Committer:
- Sinterbaas
- Date:
- 2016-01-05
- Revision:
- 0:62cd782bbb11
- Child:
- 1:39cb90d4bbed
File content as of revision 0:62cd782bbb11:
#ifndef PCCONTROLS_H #define PCCONTROLS_H #include "mbed.h" #include "MotorController.h" class MotorControlsPc { public: MotorControlsPc(Serial &pc, MotorController &motorController); void ProcessPcInput(); 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'; Serial &pc; MotorController &motorController; }; #endif