3rd year group project. Electronic and Electrical Engineering. Heriot-Watt University. This is the code for the mbed for the Automatic Little Object Organiser (ALOO).
Dependencies: MCP23017 TCS3472_I2C WattBob_TextLCD mbed
commander.h@6:98fe30430194, 2015-11-16 (annotated)
- Committer:
- dreamselec
- Date:
- Mon Nov 16 05:10:17 2015 +0000
- Revision:
- 6:98fe30430194
- Parent:
- 3:843b830ee8bd
- Child:
- 8:e1da2ae62885
Started using class-object structure instead of structs. More control.
New classes: Commander, FPGA, Block, Colour.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dreamselec |
6:98fe30430194 | 1 | // |
dreamselec |
6:98fe30430194 | 2 | // commander.h |
dreamselec |
6:98fe30430194 | 3 | // Created by Chandan Siyag on 14/11/2015. |
dreamselec |
6:98fe30430194 | 4 | |
dreamselec | 2:7a55cb10259f | 5 | #include "globals.h" |
dreamselec | 2:7a55cb10259f | 6 | |
dreamselec |
6:98fe30430194 | 7 | #ifndef _commander_h_ |
dreamselec |
6:98fe30430194 | 8 | #define _commander_h_ |
dreamselec | 2:7a55cb10259f | 9 | |
dreamselec | 2:7a55cb10259f | 10 | |
dreamselec |
6:98fe30430194 | 11 | class Commander { |
dreamselec |
6:98fe30430194 | 12 | public: |
dreamselec |
6:98fe30430194 | 13 | Commander(); |
dreamselec |
6:98fe30430194 | 14 | |
dreamselec |
6:98fe30430194 | 15 | CommandTypeRaw typeRaw; |
dreamselec |
6:98fe30430194 | 16 | char typeChar; |
dreamselec |
6:98fe30430194 | 17 | std::string object; |
dreamselec |
6:98fe30430194 | 18 | std::string command; |
dreamselec |
6:98fe30430194 | 19 | |
dreamselec |
6:98fe30430194 | 20 | void decodeCommand(CommandTypeRaw type); |
dreamselec |
6:98fe30430194 | 21 | std::string description(); |
dreamselec |
6:98fe30430194 | 22 | |
dreamselec |
6:98fe30430194 | 23 | virtual ~Commander(); |
dreamselec |
6:98fe30430194 | 24 | |
dreamselec |
6:98fe30430194 | 25 | private: |
dreamselec |
6:98fe30430194 | 26 | void readCommandObject(); |
dreamselec |
6:98fe30430194 | 27 | }; |
dreamselec | 2:7a55cb10259f | 28 | |
dreamselec |
6:98fe30430194 | 29 | #endif |