car chassis
Dependencies: Servo mbed-rtos mbed
engine.hpp@4:7fa7f78cbb92, 2015-10-13 (annotated)
- Committer:
- mariob
- Date:
- Tue Oct 13 14:08:44 2015 +0000
- Revision:
- 4:7fa7f78cbb92
- Parent:
- 2:7dfc8dd6aab3
delete unused library
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mariob | 1:79b1ee0f97ef | 1 | #ifndef __ENGINE_HPP__ |
| mariob | 1:79b1ee0f97ef | 2 | #define __ENGINE_HPP__ |
| mariob | 1:79b1ee0f97ef | 3 | |
| mariob | 2:7dfc8dd6aab3 | 4 | /** |
| mariob | 2:7dfc8dd6aab3 | 5 | * Initialization of the engine component: |
| mariob | 2:7dfc8dd6aab3 | 6 | * - main engine |
| mariob | 2:7dfc8dd6aab3 | 7 | * - steering motor |
| mariob | 2:7dfc8dd6aab3 | 8 | */ |
| mariob | 1:79b1ee0f97ef | 9 | void init_engine(); |
| mariob | 1:79b1ee0f97ef | 10 | |
| mariob | 2:7dfc8dd6aab3 | 11 | /** |
| mariob | 2:7dfc8dd6aab3 | 12 | * The thread executes periodically: |
| mariob | 2:7dfc8dd6aab3 | 13 | * - check inputs: if no message has arrived for 2.5 seconds, switch the |
| mariob | 2:7dfc8dd6aab3 | 14 | * actuators off |
| mariob | 2:7dfc8dd6aab3 | 15 | * - actuation: |
| mariob | 2:7dfc8dd6aab3 | 16 | * - rotate steering servo motor |
| mariob | 2:7dfc8dd6aab3 | 17 | * - main engine: |
| mariob | 2:7dfc8dd6aab3 | 18 | * - if the driver is breaking, block the motor for no more than 1 seconds |
| mariob | 2:7dfc8dd6aab3 | 19 | * (while breaking the engine dissipates much power) |
| mariob | 2:7dfc8dd6aab3 | 20 | * - otherwise, set direction and set the current which flows into the |
| mariob | 2:7dfc8dd6aab3 | 21 | * motor |
| mariob | 2:7dfc8dd6aab3 | 22 | */ |
| mariob | 1:79b1ee0f97ef | 23 | void thread_engine (void const *args); |
| mariob | 1:79b1ee0f97ef | 24 | |
| mariob | 1:79b1ee0f97ef | 25 | #endif //__ENGINE_HPP__ |
Mario Bambagini