![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
Comm/Comm.h@5:c3d671959ef3, 2015-12-03 (annotated)
- Committer:
- amandaghassaei
- Date:
- Thu Dec 03 04:52:45 2015 +0000
- Revision:
- 5:c3d671959ef3
- Parent:
- 4:ebb882658c50
- Child:
- 6:12b6be801ad8
working comm;
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 "mbed.h" |
amandaghassaei | 2:17b18ea93551 | 5 | #include "json.h" |
amandaghassaei | 2:17b18ea93551 | 6 | #include "Target.h" |
amandaghassaei | 5:c3d671959ef3 | 7 | #include "CommDelegate.h" |
amandaghassaei | 5:c3d671959ef3 | 8 | #include "mbed_rpc.h" |
amandaghassaei | 2:17b18ea93551 | 9 | //#include "MODSERIAL.h" |
amandaghassaei | 2:17b18ea93551 | 10 | |
amandaghassaei | 2:17b18ea93551 | 11 | |
amandaghassaei | 2:17b18ea93551 | 12 | class Comm{ |
amandaghassaei | 2:17b18ea93551 | 13 | |
amandaghassaei | 2:17b18ea93551 | 14 | public: |
amandaghassaei | 2:17b18ea93551 | 15 | |
amandaghassaei | 2:17b18ea93551 | 16 | Comm(CommDelegate *gains, CommDelegate *target, CommDelegate *myMPU6050_1); |
amandaghassaei | 2:17b18ea93551 | 17 | |
amandaghassaei | 5:c3d671959ef3 | 18 | void openGripper1(Arguments* input, Reply* output); |
amandaghassaei | 5:c3d671959ef3 | 19 | void closeGripper1(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 20 | void printGripper1State(bool state); |
amandaghassaei | 5:c3d671959ef3 | 21 | void openGripper2(Arguments* input, Reply* output); |
amandaghassaei | 5:c3d671959ef3 | 22 | void closeGripper2(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 23 | void printGripper2State(bool state); |
amandaghassaei | 2:17b18ea93551 | 24 | |
amandaghassaei | 5:c3d671959ef3 | 25 | void setGains(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 26 | void printGains(); |
amandaghassaei | 2:17b18ea93551 | 27 | |
amandaghassaei | 5:c3d671959ef3 | 28 | void setTarget(Arguments* input, Reply* output); |
amandaghassaei | 2:17b18ea93551 | 29 | void printTarget(); |
amandaghassaei | 2:17b18ea93551 | 30 | |
amandaghassaei | 2:17b18ea93551 | 31 | void printPosition(); |
amandaghassaei | 2:17b18ea93551 | 32 | |
amandaghassaei | 4:ebb882658c50 | 33 | void check(); |
amandaghassaei | 2:17b18ea93551 | 34 | |
amandaghassaei | 4:ebb882658c50 | 35 | Serial _pc; |
amandaghassaei | 2:17b18ea93551 | 36 | |
amandaghassaei | 2:17b18ea93551 | 37 | private: |
amandaghassaei | 2:17b18ea93551 | 38 | |
amandaghassaei | 5:c3d671959ef3 | 39 | void throwNotEnoughArgsError(); |
amandaghassaei | 4:ebb882658c50 | 40 | |
amandaghassaei | 4:ebb882658c50 | 41 | char buf[256], outbuf[256]; |
amandaghassaei | 2:17b18ea93551 | 42 | |
amandaghassaei | 2:17b18ea93551 | 43 | JSON _json; |
amandaghassaei | 2:17b18ea93551 | 44 | CommDelegate *_gains; |
amandaghassaei | 2:17b18ea93551 | 45 | CommDelegate *_target; |
amandaghassaei | 2:17b18ea93551 | 46 | CommDelegate *_myMPU6050_1; |
amandaghassaei | 2:17b18ea93551 | 47 | // volatile bool newline_detected = false; |
amandaghassaei | 2:17b18ea93551 | 48 | |
amandaghassaei | 2:17b18ea93551 | 49 | }; |
amandaghassaei | 2:17b18ea93551 | 50 | |
amandaghassaei | 2:17b18ea93551 | 51 | #endif |