NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.
PC/PC.h@34:3aa1cbcde59d, 2013-06-10 (annotated)
- Committer:
- maetugr
- Date:
- Mon Jun 10 13:22:46 2013 +0000
- Revision:
- 34:3aa1cbcde59d
First version with new ESCs (they are working with the KK Board); some strange kicks in the behaviour of balancing, next step a logger
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maetugr | 34:3aa1cbcde59d | 1 | #include "mbed.h" |
maetugr | 34:3aa1cbcde59d | 2 | |
maetugr | 34:3aa1cbcde59d | 3 | #ifndef PC_H |
maetugr | 34:3aa1cbcde59d | 4 | #define PC_H |
maetugr | 34:3aa1cbcde59d | 5 | |
maetugr | 34:3aa1cbcde59d | 6 | #define COMMAND_MAX_LENGHT 300 |
maetugr | 34:3aa1cbcde59d | 7 | |
maetugr | 34:3aa1cbcde59d | 8 | class PC : public Serial |
maetugr | 34:3aa1cbcde59d | 9 | { |
maetugr | 34:3aa1cbcde59d | 10 | public: |
maetugr | 34:3aa1cbcde59d | 11 | PC(PinName tx, PinName rx, int baud); |
maetugr | 34:3aa1cbcde59d | 12 | void cls(); // to clear the display |
maetugr | 34:3aa1cbcde59d | 13 | void locate(int column, int row); // to relocate the cursor |
maetugr | 34:3aa1cbcde59d | 14 | void readcommand(void (*executer)(char*)); // to read a char from the pc to the command string |
maetugr | 34:3aa1cbcde59d | 15 | |
maetugr | 34:3aa1cbcde59d | 16 | char command[COMMAND_MAX_LENGHT]; |
maetugr | 34:3aa1cbcde59d | 17 | private: |
maetugr | 34:3aa1cbcde59d | 18 | int command_char_count; |
maetugr | 34:3aa1cbcde59d | 19 | }; |
maetugr | 34:3aa1cbcde59d | 20 | #endif |