return rv;
}
-/**
- * Destroy ORTE stuffs.
- *
- * @return 0
- */
-int robot_orte_destroy()
-{
- robot.orte.laser_cmd.speed = LASER_DRIVE_OFF;
- ORTEPublicationSend(robot.orte.publication_laser_cmd);
- ORTEPublicationSend(robot.orte.publication_laser_cmd);
-
- off_brush_left();
- off_brush_right();
- robot.orte.motion_speed.right = 0;
- robot.orte.motion_speed.left = 0;
- ORTEPublicationSend(robot.orte.publication_motion_speed);
-
- robottype_roboorte_destroy(&robot.orte);
-
- return 0;
-}
-
/**
* Signals all the robot threads to finish.
- * @return 0
*/
-int robot_exit()
+void robot_exit()
{
int i;
fsm_exit(&robot.fsm[i]);
}
- robot_orte_destroy();
-
return 0;
}
/**
* Stops the robot. All resources alocated by robot_init() or
* robot_start() are dealocated here.
- * @return 0
*/
-int robot_destroy()
+void robot_destroy()
{
int i;
+ robot.orte.laser_cmd.speed = LASER_DRIVE_OFF;
+ ORTEPublicationSend(robot.orte.publication_laser_cmd);
+ ORTEPublicationSend(robot.orte.publication_laser_cmd);
+
+ off_brush_left();
+ off_brush_right();
+ robot.orte.motion_speed.right = 0;
+ robot.orte.motion_speed.left = 0;
+ ORTEPublicationSend(robot.orte.publication_motion_speed);
+
+ robottype_roboorte_destroy(&robot.orte);
+
for (i=0; i<FSM_CNT; i++)
fsm_destroy(&robot.fsm[i]);
DBG("robofsm: stop.\n");
extern "C" {
#endif
-int __attribute__ ((warn_unused_result)) robot_init();
-int __attribute__ ((warn_unused_result)) robot_start();
-int robot_exit();
-int robot_destroy();
-int robot_orte_destroy();
+int robot_init() __attribute__ ((warn_unused_result));
+int robot_start() __attribute__ ((warn_unused_result));
+void robot_exit();
+void robot_destroy();
/* Hack to easily disable display if it is not configured */
void serial_comm(int status);