Matthias Grob
/
FlyBed2
My fully self designed first stable working Quadrocopter Software.
PC/PC.h@0:12950aa67f2a, 2013-09-02 (annotated)
- Committer:
- maetugr
- Date:
- Mon Sep 02 15:04:22 2013 +0000
- Revision:
- 0:12950aa67f2a
first commit of new version (only one axis for test until now); note: no more Ticker! (made problems because of interrupts)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maetugr | 0:12950aa67f2a | 1 | #include "mbed.h" |
maetugr | 0:12950aa67f2a | 2 | |
maetugr | 0:12950aa67f2a | 3 | #ifndef PC_H |
maetugr | 0:12950aa67f2a | 4 | #define PC_H |
maetugr | 0:12950aa67f2a | 5 | |
maetugr | 0:12950aa67f2a | 6 | #define COMMAND_MAX_LENGHT 300 |
maetugr | 0:12950aa67f2a | 7 | |
maetugr | 0:12950aa67f2a | 8 | class PC : public Serial |
maetugr | 0:12950aa67f2a | 9 | { |
maetugr | 0:12950aa67f2a | 10 | public: |
maetugr | 0:12950aa67f2a | 11 | PC(PinName tx, PinName rx, int baud); |
maetugr | 0:12950aa67f2a | 12 | void cls(); // to clear the display |
maetugr | 0:12950aa67f2a | 13 | void locate(int column, int row); // to relocate the cursor |
maetugr | 0:12950aa67f2a | 14 | void readcommand(void (*executer)(char*)); // to read a char from the pc to the command string |
maetugr | 0:12950aa67f2a | 15 | |
maetugr | 0:12950aa67f2a | 16 | char command[COMMAND_MAX_LENGHT]; |
maetugr | 0:12950aa67f2a | 17 | private: |
maetugr | 0:12950aa67f2a | 18 | int command_char_count; |
maetugr | 0:12950aa67f2a | 19 | }; |
maetugr | 0:12950aa67f2a | 20 | #endif |