From b31a8fe58dc6ac1fdd89d8e876ca95e235d918ce Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 29 Apr 2010 23:51:23 +0200 Subject: [PATCH] eb_vidle: Use robot_switches message --- src/common/can_ids.h | 4 ++-- src/eb_vidle/main.c | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/common/can_ids.h b/src/common/can_ids.h index fdcf1b7c..0b4440d3 100644 --- a/src/common/can_ids.h +++ b/src/common/can_ids.h @@ -37,7 +37,8 @@ -#define CAN_BUMPER to_boa(0x30) +#define CAN_ROBOT_SWITCHES to_boa(0x30) + // ids of can-peripherials #define CAN_CHELAE to_per(0x32) /**< BOA->PER @copydetails set_chelae() front view 1st B left, 2nd B right */ #define CAN_ADC_1 to_boa(0x33) /* PER->BOA */ @@ -67,7 +68,6 @@ //#define CAN_ERROR to_boa(0x48) // FIXME: (F.J.) rename me, ... -#define CAN_ROBOT_SWITCHES to_boa(0x47) #define CAN_VIDLE_STATUS to_boa(0x48) #define CAN_VIDLE_CMD to_per(0x49) diff --git a/src/eb_vidle/main.c b/src/eb_vidle/main.c index 8e44b271..7226d5f2 100644 --- a/src/eb_vidle/main.c +++ b/src/eb_vidle/main.c @@ -258,6 +258,7 @@ void blink_led() void handle_bumper() { static uint32_t bumper_time = 0; + char sw = 0; if (timer_msec >= bumper_time + 100) { @@ -265,22 +266,26 @@ void handle_bumper() bumper_time = timer_msec; - tx_msg.id = CAN_BUMPER; - tx_msg.dlc = 1; - tx_msg.flags = 0; if (IO0PIN & (1<