case BT1:
if(state) {
//act_chelas(CHELA_LEFT_CLOSE, CHELA_RIGHT_CLOSE);//act ON
- act_picker(CHELA_LEFT_TIGHT, CHELA_RIGHT_TIGHT, BELTS_OUT, BELTS_OUT, CHELA_TIMEOUT);
- printf("Fire button pressed; belt speed set: %d\n", BELTS_OUT);
+ //act_picker(CHELA_LEFT_TIGHT, CHELA_RIGHT_TIGHT, BELTS_OUT, BELTS_OUT, CHELA_TIMEOUT);
+ //printf("Fire button pressed; belt speed set: %d\n", BELTS_OUT);
} else {
//act_chelas(CHELA_LEFT_OPEN, CHELA_RIGHT_OPEN);//act OFF
//act_picker(CHELA_LEFT_TIGHT, CHELA_RIGHT_TIGHT, BELTS_IN, BELTS_IN, 0x1);
case BT2:
if(state) {
//act_holder(HOLDER_OPENED);//act ON
- act_picker(CHELA_LEFT_TIGHT, CHELA_RIGHT_TIGHT, BELTS_IN, BELTS_IN, CHELA_TIMEOUT);
- printf("Suck button pressed; belt speed set: %d\n", BELTS_IN);
+ //act_picker(CHELA_LEFT_TIGHT, CHELA_RIGHT_TIGHT, BELTS_IN, BELTS_IN, CHELA_TIMEOUT);
+ //printf("Suck button pressed; belt speed set: %d\n", BELTS_IN);
} else {
//act_holder(HOLDER_CLOSED);//act OFF
//act_picker(CHELA_LEFT_TIGHT, CHELA_RIGHT_TIGHT, BELTS_OUT, BELTS_OUT, 0x1);
break;
case BT3:
if(state)
- act_belts(BELTS_OFF, BELTS_OFF);//act ON
+ act_belts(BELTS_IN, BELTS_IN);//act ON
else
act_belts(BELTS_OFF, BELTS_OFF);//act OFF
break;
break;
case BT5:
if(state)
- act_belts(BELTS_IN, BELTS_IN);//act ON
+ act_belts(BELTS_OUT, BELTS_OUT);//act ON
else
- act_belts(BELTS_IN, BELTS_IN);//act OFF
+ act_belts(BELTS_OFF, BELTS_OFF);//act OFF
break;
case BT6:
if(state)
- act_belts(BELTS_OUT, BELTS_OUT);//act ON
+ ;//act ON
else
- act_belts(BELTS_OUT, BELTS_OUT);//act OFF
+ ;//act OFF
break;
case BT7:
if(state)
}
else {
buttons_prev[id] = 0;
+ button_act(state, id);
}
}
/* creating publishers */
robottype_publisher_motion_speed_create(&orte, NULL, &orte);
- //robottype_publisher_chelas_create(&orte, NULL, &orte);
- //robottype_publisher_belts_create(&orte, NULL, &orte);
- robottype_publisher_picker_create(&orte, NULL, &orte);
+ robottype_publisher_chelas_create(&orte, NULL, &orte);
+ robottype_publisher_belts_create(&orte, NULL, &orte);
+ robottype_publisher_picker_create(&orte, NULL, &orte); // FIXME: temporary, should be present only until the LPCs are ready
if(open_joystick(joy_name, &num_of_axis, &num_of_buttons) == -1) {
printf("Joystick not found, exiting...\n");
robottype_publisher_lift_create(&robot.orte, send_dummy_cb, &robot.orte);
robottype_publisher_pusher_create(&robot.orte, send_dummy_cb, &robot.orte);
- //robottype_publisher_chelas_create(&robot.orte, send_dummy_cb, &robot.orte);
- //robottype_publisher_belts_create(&robot.orte, send_dummy_cb, &robot.orte);
+ robottype_publisher_chelas_create(&robot.orte, send_dummy_cb, &robot.orte);
+ robottype_publisher_belts_create(&robot.orte, send_dummy_cb, &robot.orte);
robottype_publisher_picker_create(&robot.orte, send_dummy_cb, &robot.orte); /* FIXME temporary till LPCs not ready */
robottype_publisher_holder_create(&robot.orte, send_dummy_cb, &robot.orte);