version 3 通信方式,マイコン等に変更あり
Dependencies: AQM0802A PID Servo mbed
Diff: usart.cpp
- Revision:
- 5:09afcbe0c18f
- Parent:
- 4:2857f273a7f4
diff -r 2857f273a7f4 -r 09afcbe0c18f usart.cpp --- a/usart.cpp Wed Mar 11 01:03:00 2015 +0000 +++ b/usart.cpp Fri Mar 13 01:14:38 2015 +0000 @@ -14,7 +14,7 @@ extern uint8_t PingData[4]; extern uint8_t IrData[3]; extern uint8_t IrNum; -extern unsigned int Compass; +extern int Compass; @@ -38,7 +38,7 @@ PingData[1] = rx_data[5]; PingData[2] = rx_data[6]; PingData[3] = rx_data[7]; - Compass = rx_data[8] + rx_data[9]; + Compass = rx_data[8] | rx_data[9]<<8; if((IrData[0] == 255)||(IrData[1] == 255)||(IrData[2] == 255)){ IrNum = 12;