Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PcControls.h@1:39cb90d4bbed, 2016-01-06 (annotated)
- Committer:
- jurgy
- Date:
- Wed Jan 06 12:17:52 2016 +0000
- Revision:
- 1:39cb90d4bbed
- Parent:
- 0:62cd782bbb11
- Child:
- 2:f3dbcaf26222
Change process input interface
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sinterbaas | 0:62cd782bbb11 | 1 | #ifndef PCCONTROLS_H |
Sinterbaas | 0:62cd782bbb11 | 2 | #define PCCONTROLS_H |
Sinterbaas | 0:62cd782bbb11 | 3 | |
Sinterbaas | 0:62cd782bbb11 | 4 | #include "mbed.h" |
Sinterbaas | 0:62cd782bbb11 | 5 | #include "MotorController.h" |
Sinterbaas | 0:62cd782bbb11 | 6 | |
Sinterbaas | 0:62cd782bbb11 | 7 | class MotorControlsPc { |
Sinterbaas | 0:62cd782bbb11 | 8 | public: |
Sinterbaas | 0:62cd782bbb11 | 9 | MotorControlsPc(Serial &pc, MotorController &motorController); |
Sinterbaas | 0:62cd782bbb11 | 10 | |
jurgy | 1:39cb90d4bbed | 11 | void ProcessPcInput(char c); |
Sinterbaas | 0:62cd782bbb11 | 12 | |
Sinterbaas | 0:62cd782bbb11 | 13 | private: |
Sinterbaas | 0:62cd782bbb11 | 14 | static const char MOTOR_POSITION_0 = '0'; |
Sinterbaas | 0:62cd782bbb11 | 15 | static const char MOTOR_POSITION_1 = '1'; |
Sinterbaas | 0:62cd782bbb11 | 16 | static const char MOTOR_POSITION_2 = '2'; |
Sinterbaas | 0:62cd782bbb11 | 17 | static const char MOTOR_POSITION_3 = '3'; |
Sinterbaas | 0:62cd782bbb11 | 18 | static const char MOTOR_POSITION_4 = '4'; |
Sinterbaas | 0:62cd782bbb11 | 19 | static const char MOTOR_POSITION_5 = '5'; |
Sinterbaas | 0:62cd782bbb11 | 20 | static const char MOTOR_POSITION_6 = '6'; |
Sinterbaas | 0:62cd782bbb11 | 21 | static const char MOTOR_POSITION_7 = '7'; |
Sinterbaas | 0:62cd782bbb11 | 22 | static const char MOTOR_POSITION_8 = '8'; |
Sinterbaas | 0:62cd782bbb11 | 23 | static const char MOTOR_POSITION_9 = '9'; |
Sinterbaas | 0:62cd782bbb11 | 24 | static const char MOTOR_POSITION_10 = '-'; |
Sinterbaas | 0:62cd782bbb11 | 25 | static const char MOTOR_START = 's'; |
Sinterbaas | 0:62cd782bbb11 | 26 | static const char MOTOR_FORWARD = 'f'; |
Sinterbaas | 0:62cd782bbb11 | 27 | static const char MOTOR_BACKWARD = 'b'; |
Sinterbaas | 0:62cd782bbb11 | 28 | static const char MOTOR_POSITION = 'p'; |
Sinterbaas | 0:62cd782bbb11 | 29 | |
Sinterbaas | 0:62cd782bbb11 | 30 | Serial &pc; |
Sinterbaas | 0:62cd782bbb11 | 31 | MotorController &motorController; |
Sinterbaas | 0:62cd782bbb11 | 32 | }; |
Sinterbaas | 0:62cd782bbb11 | 33 | |
Sinterbaas | 0:62cd782bbb11 | 34 | #endif |