3/19 23:30
Dependencies: mbed move4wheel2 EC CruizCore_R1370P
Diff: can/can.cpp
- Revision:
- 1:3c11e07da92a
- Parent:
- 0:c61c6e4775ca
- Child:
- 2:7cba05e70367
--- a/can/can.cpp Wed Feb 13 03:02:19 2019 +0000 +++ b/can/can.cpp Mon Feb 25 06:18:09 2019 +0000 @@ -31,32 +31,32 @@ } if(msg.id == 3){ - usw_data1 = 0.01 * (short)((msg.data[0]<<8) | msg.data[1]); + usw_data1 = 0.1 * (short)((msg.data[0]<<8) | msg.data[1]); //printf("usw_data1 = %d:%d,%lf\n\r",msg.data[0],msg.data[1],usw_data1); //debug_printf("%f\n\r",usw_data1); } - if(msg.id == 4){ - usw_data2 = 0.01 * (short)((msg.data[0]<<8) | msg.data[1]); + /* if(msg.id == 4){ + usw_data2 = 0.1 * (short)((msg.data[0]<<8) | msg.data[1]); //printf("usw_data2 = %d:%d,%d\n\r",msg.data[0],msg.data[1],usw_data2); - } + }*/ if(msg.id == 5){ - usw_data3 = 0.01 * (short)((msg.data[0]<<8) | msg.data[1]); + usw_data3 = 0.1 * (short)((msg.data[0]<<8) | msg.data[1]); //printf("usw_data3 = %d:%d,%d\n\r",msg.data[0],msg.data[1],usw_data3); //debug_printf("%f\n\r",usw_data3); } - if(msg.id == 6){ - usw_data4 = 0.01 * (short)((msg.data[0]<<8) | msg.data[1]); + /*if(msg.id == 6){ + usw_data4 = 0.1 * (short)((msg.data[0]<<8) | msg.data[1]); //printf("usw_data4 = %d:%d,%d\n\r",msg.data[0],msg.data[1],usw_data4); - } + }*/ }else{ canread_led = 0; } - if(can1.write(CANMessage(7,ashi_data,1))) { //IDを7にして送信 + if(can1.write(CANMessage(7,ashi_data,4))) { //IDを7にして送信 cansend_led = 1; }else{ cansend_led = 0;