bio robot
Dependencies: MPU6050-DMP QEI_hw mbed-rpc mbed
Fork of MPU6050_Example by
Comm/Comm.h@10:769cc457c3a4, 2015-12-05 (annotated)
- Committer:
- amandaghassaei
- Date:
- Sat Dec 05 09:04:23 2015 +0000
- Revision:
- 10:769cc457c3a4
- Parent:
- 9:1d9b24d7ac77
- Child:
- 11:711d3c207e8c
swinging looking good;
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 | 9:1d9b24d7ac77 | 13 | Comm(CommDelegate *controls); |
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 | 9:1d9b24d7ac77 | 22 | void setSwingUpK(Arguments* input, Reply* output); |
amandaghassaei | 9:1d9b24d7ac77 | 23 | void setSwingUpD(Arguments* input, Reply* output); |
amandaghassaei | 10:769cc457c3a4 | 24 | void setCurrentP(Arguments* input, Reply* output); |
amandaghassaei | 10:769cc457c3a4 | 25 | void setCurrentD(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 | 9:1d9b24d7ac77 | 31 | void setTorque(Arguments * input, Reply * output); |
amandaghassaei | 9:1d9b24d7ac77 | 32 | |
amandaghassaei | 9:1d9b24d7ac77 | 33 | void printPosition(); |
amandaghassaei | 2:17b18ea93551 | 34 | |
amandaghassaei | 4:ebb882658c50 | 35 | void check(); |
amandaghassaei | 2:17b18ea93551 | 36 | |
amandaghassaei | 9:1d9b24d7ac77 | 37 | Serial* getPC(); |
amandaghassaei | 2:17b18ea93551 | 38 | |
amandaghassaei | 2:17b18ea93551 | 39 | private: |
amandaghassaei | 2:17b18ea93551 | 40 | |
amandaghassaei | 9:1d9b24d7ac77 | 41 | Serial _pc; |
amandaghassaei | 9:1d9b24d7ac77 | 42 | |
amandaghassaei | 5:c3d671959ef3 | 43 | void throwNotEnoughArgsError(); |
amandaghassaei | 4:ebb882658c50 | 44 | |
amandaghassaei | 4:ebb882658c50 | 45 | char buf[256], outbuf[256]; |
amandaghassaei | 2:17b18ea93551 | 46 | |
amandaghassaei | 2:17b18ea93551 | 47 | JSON _json; |
amandaghassaei | 9:1d9b24d7ac77 | 48 | CommDelegate *_controls; |
amandaghassaei | 2:17b18ea93551 | 49 | // volatile bool newline_detected = false; |
amandaghassaei | 2:17b18ea93551 | 50 | |
amandaghassaei | 2:17b18ea93551 | 51 | }; |
amandaghassaei | 2:17b18ea93551 | 52 | |
amandaghassaei | 2:17b18ea93551 | 53 | #endif |