Communication for reciever
Dependencies: Fork_Boss_Communication_Robot
Dependents: BEAR_Motion BEAR_Motion_Editing4Betago
Fork of BEAR_Protocol by
Receiver.h@10:c9bc32595d56, 2016-01-21 (annotated)
- Committer:
- soulx
- Date:
- Thu Jan 21 16:42:25 2016 +0000
- Revision:
- 10:c9bc32595d56
- Parent:
- 8:2d34916ac178
- Child:
- 11:b9337e23782e
add #ifndef
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
soulx | 10:c9bc32595d56 | 1 | #ifndef __RECEIVER__H_ |
soulx | 10:c9bc32595d56 | 2 | #define __RECEIVER__H_ |
soulx | 10:c9bc32595d56 | 3 | |
b0ssiz | 5:baf5576a14bd | 4 | #include "mbed.h" |
b0ssiz | 5:baf5576a14bd | 5 | #include "iSerial.h" |
b0ssiz | 5:baf5576a14bd | 6 | #include "Command.h" |
b0ssiz | 5:baf5576a14bd | 7 | #include "communication.h" |
b0ssiz | 5:baf5576a14bd | 8 | #define RS485_DELAY 90 |
b0ssiz | 5:baf5576a14bd | 9 | #define RS485_DIRC PB_5 |
b0ssiz | 7:a0ea8c127611 | 10 | #define FLOAT_CONVERTER 10000 |
b0ssiz | 5:baf5576a14bd | 11 | |
b0ssiz | 5:baf5576a14bd | 12 | class Bear_Receiver |
b0ssiz | 5:baf5576a14bd | 13 | { |
b0ssiz | 5:baf5576a14bd | 14 | private: |
b0ssiz | 5:baf5576a14bd | 15 | COMMUNICATION *com; |
b0ssiz | 5:baf5576a14bd | 16 | |
b0ssiz | 5:baf5576a14bd | 17 | public: |
b0ssiz | 5:baf5576a14bd | 18 | Bear_Receiver(PinName,PinName,int); |
b0ssiz | 5:baf5576a14bd | 19 | void FloatSep(float,uint8_t*,uint8_t*); |
b0ssiz | 7:a0ea8c127611 | 20 | |
b0ssiz | 5:baf5576a14bd | 21 | //Receiver |
b0ssiz | 8:2d34916ac178 | 22 | uint8_t ReceiveCommand(uint8_t*,uint8_t*,uint8_t*); |
b0ssiz | 5:baf5576a14bd | 23 | //Sender |
b0ssiz | 5:baf5576a14bd | 24 | uint8_t sendMotorPos(uint8_t,float,float); |
b0ssiz | 6:f6529ad2a70d | 25 | uint8_t sendUpMotorKpKiKd(uint8_t,float,float,float); |
b0ssiz | 6:f6529ad2a70d | 26 | uint8_t sendLowMotorKpKiKd(uint8_t,float,float,float); |
b0ssiz | 5:baf5576a14bd | 27 | uint8_t sendMargin(uint8_t,float); |
b0ssiz | 5:baf5576a14bd | 28 | uint8_t sendHeight(uint8_t,float); |
b0ssiz | 5:baf5576a14bd | 29 | uint8_t sendWheelPos(uint8_t,float); |
b0ssiz | 5:baf5576a14bd | 30 | uint8_t sendMagData(uint8_t,float,float,float,float,float,float); |
b0ssiz | 5:baf5576a14bd | 31 | uint8_t sendOffset(uint8_t,float,float); |
b0ssiz | 5:baf5576a14bd | 32 | uint8_t sendBodyLength(uint8_t,float); |
b0ssiz | 5:baf5576a14bd | 33 | uint8_t sendAngleRange(uint8_t,float,float); |
soulx | 10:c9bc32595d56 | 34 | }; |
soulx | 10:c9bc32595d56 | 35 | |
soulx | 10:c9bc32595d56 | 36 | #endif |