bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
Comm/Comm.h@8:1a3a69fecedf, 2015-12-03 (annotated)
- Committer:
- amandaghassaei
- Date:
- Thu Dec 03 23:55:44 2015 +0000
- Revision:
- 8:1a3a69fecedf
- Parent:
- 6:12b6be801ad8
- Child:
- 9:1d9b24d7ac77
added in matlab controls;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
amandaghassaei | 2:17b18ea93551 | 1 | #ifndef Comm_h |
amandaghassaei | 2:17b18ea93551 | 2 | #define Comm_h |
amandaghassaei | 2:17b18ea93551 | 3 | |
amandaghassaei | 2:17b18ea93551 | 4 | #include "json.h" |
amandaghassaei | 5:c3d671959ef3 | 5 | #include "CommDelegate.h" |
amandaghassaei | 5:c3d671959ef3 | 6 | #include "mbed_rpc.h" |
amandaghassaei | 2:17b18ea93551 | 7 | |
amandaghassaei | 2:17b18ea93551 | 8 | |
amandaghassaei | 2:17b18ea93551 | 9 | class Comm{ |
amandaghassaei | 2:17b18ea93551 | 10 | |
amandaghassaei | 2:17b18ea93551 | 11 | public: |
amandaghassaei | 2:17b18ea93551 | 12 | |
amandaghassaei | 8:1a3a69fecedf | 13 | Comm(CommDelegate *gains, CommDelegate *target); |
amandaghassaei | 2:17b18ea93551 | 14 | |
amandaghassaei | 5:c3d671959ef3 | 15 | void openGripper1(Arguments* input, Reply* output); |
amandaghassaei | 5:c3d671959ef3 | 16 | void closeGripper1(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 17 | void printGripper1State(bool state); |
amandaghassaei | 5:c3d671959ef3 | 18 | void openGripper2(Arguments* input, Reply* output); |
amandaghassaei | 5:c3d671959ef3 | 19 | void closeGripper2(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 20 | void printGripper2State(bool state); |
amandaghassaei | 2:17b18ea93551 | 21 | |
amandaghassaei | 5:c3d671959ef3 | 22 | void setGains(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 23 | void printGains(); |
amandaghassaei | 2:17b18ea93551 | 24 | |
amandaghassaei | 5:c3d671959ef3 | 25 | void setTarget(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 26 | void printTarget(); |
amandaghassaei | 2:17b18ea93551 | 27 | |
amandaghassaei | 8:1a3a69fecedf | 28 | void printPosition(CommDelegate *controls); |
amandaghassaei | 2:17b18ea93551 | 29 | |
amandaghassaei | 4:ebb882658c50 | 30 | void check(); |
amandaghassaei | 2:17b18ea93551 | 31 | |
amandaghassaei | 4:ebb882658c50 | 32 | Serial _pc; |
amandaghassaei | 2:17b18ea93551 | 33 | |
amandaghassaei | 2:17b18ea93551 | 34 | private: |
amandaghassaei | 2:17b18ea93551 | 35 | |
amandaghassaei | 5:c3d671959ef3 | 36 | void throwNotEnoughArgsError(); |
amandaghassaei | 4:ebb882658c50 | 37 | |
amandaghassaei | 4:ebb882658c50 | 38 | char buf[256], outbuf[256]; |
amandaghassaei | 2:17b18ea93551 | 39 | |
amandaghassaei | 2:17b18ea93551 | 40 | JSON _json; |
amandaghassaei | 2:17b18ea93551 | 41 | CommDelegate *_gains; |
amandaghassaei | 2:17b18ea93551 | 42 | CommDelegate *_target; |
amandaghassaei | 2:17b18ea93551 | 43 | // volatile bool newline_detected = false; |
amandaghassaei | 2:17b18ea93551 | 44 | |
amandaghassaei | 2:17b18ea93551 | 45 | }; |
amandaghassaei | 2:17b18ea93551 | 46 | |
amandaghassaei | 2:17b18ea93551 | 47 | #endif |