void rcv_puck_inside_cb(const ORTERecvInfo *info, void *vinstance,
void *recvCallBackParam)
{
- static bool previous_switch_status;
switch (info->status) {
case NEW_DATA: {
if (robot.use_back_switch) {
- if (robot.orte.puck_inside.status & 0x01) {
+ static bool previous_switch_status = 0;
+ if (robot.orte.puck_inside.status & 0x02) {
//FSM_SIGNAL(ACT, EV_PUCK_INSIDE, NULL);
/* React on the first switch or when moving backward. */
- if ((previous_switch_status & 0x01) == 0 ||
+ if ((previous_switch_status & 0x02) == 0 ||
robot.moves_backward) {
FSM_SIGNAL(MOTION, EV_OBSTACLE_BEHIND, NULL);
}