Mario Bambagini / Mbed 2 deprecated car_chassis

Dependencies:   Servo mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers engine.hpp Source File

engine.hpp

00001 #ifndef __ENGINE_HPP__
00002 #define __ENGINE_HPP__
00003 
00004 /**
00005  * Initialization of the engine component:
00006  * - main engine
00007  * - steering motor
00008  */
00009 void init_engine();
00010 
00011 /**
00012  * The thread executes periodically:
00013  * - check inputs: if no message has arrived for 2.5 seconds, switch the
00014  *   actuators off
00015  * - actuation:
00016  *   - rotate steering servo motor
00017  *   - main engine:
00018  *     - if the driver is breaking, block the motor for no more than 1 seconds
00019  *       (while breaking the engine dissipates much power)
00020  *     - otherwise, set direction and set the current which flows into the 
00021  *       motor
00022  */
00023 void thread_engine (void const *args);
00024 
00025 #endif //__ENGINE_HPP__