Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed move4wheel2 EC CruizCore_R1370P
Diff: can/can.cpp
- Revision:
- 9:7667dcfc7ce5
- Parent:
- 8:2ba338b4590e
- Child:
- 11:9db93bce4eef
--- a/can/can.cpp Thu Mar 07 02:54:55 2019 +0000
+++ b/can/can.cpp Wed Mar 13 03:24:49 2019 +0000
@@ -5,11 +5,11 @@
#include "manual.h"
#include "can.h"
-CAN can1(p30,p29,1000000);
+CAN can1(p30,p29);
Ticker can_ticker; //can用ticker
-DigitalOut cansend_led(LED1); //canread -> on
-DigitalOut canread_led(LED2); //cansend -> on
+DigitalOut cansend_led(LED1); //cansend -> on
+DigitalOut canread_led(LED2); //canread -> on
int t1_r=0, T1=0; //動作番号(受け取った値、送信する値(int型))
@@ -32,8 +32,8 @@
id1_value[6] = (msg.data[0]>>1)%2; //decide right/left(0 or 1)
t1_r = msg.data[3]; //value of t(0~7)
- debug_printf("[0]=%d [1]=%d [2]=%d [3]=%d [4]=%d [5]=%d [6]=%d\n\r"
- ,id1_value[0],id1_value[1],id1_value[2],id1_value[3],id1_value[4],id1_value[5],id1_value[6]);
+ /*debug_printf("[0]=%d [1]=%d [2]=%d [3]=%d [4]=%d [5]=%d [6]=%d\n\r"
+ ,id1_value[0],id1_value[1],id1_value[2],id1_value[3],id1_value[4],id1_value[5],id1_value[6]);*/
debug_printf("t1_r=%d T1=%d can_ashileddata[1]=%d\n\r",t1_r,T1,can_ashileddata[1]);
}
@@ -49,6 +49,7 @@
usw_data4 = 0.1 * (short)((msg.data[6]<<8) | msg.data[7]);
//debug_printf("usw_data4 = %f\n\r",usw_data4);
+ //debug_printf("usw1=%f usw2=%f usw3=%f usw4=%f\n\r",usw_data1,usw_data2,usw_data3,usw_data4);
}
} else {