Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed PID MMA8451Q
main.cpp@41:40e432c5cbe6, 2013-06-10 (annotated)
- Committer:
- dereklmc
- Date:
- Mon Jun 10 01:37:36 2013 +0000
- Revision:
- 41:40e432c5cbe6
- Parent:
- 34:d6696dc977a2
- Child:
- 49:f202fb0d4128
Fixed motor debug and debug define.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| gabdo | 0:8681037b9a18 | 1 | #include "quadCommand.h" |
| dereklmc | 26:c6f6d6034d22 | 2 | #include "debug.h" |
| gabdo | 0:8681037b9a18 | 3 | |
| gabdo | 0:8681037b9a18 | 4 | int main() |
| gabdo | 0:8681037b9a18 | 5 | { |
| dereklmc | 26:c6f6d6034d22 | 6 | DEBUG(pc.printf("DEBUG ENABLED\r\n");) |
| oprospero | 24:63b99aee1c7c | 7 | Ticker motorProcess;// Control timer |
| gabdo | 0:8681037b9a18 | 8 | quadCommand quad; // Create quadCommand object. |
| dereklmc | 26:c6f6d6034d22 | 9 | |
| dereklmc | 41:40e432c5cbe6 | 10 | DEBUG(pc.printf("Initialized.\r\n");) |
| dereklmc | 41:40e432c5cbe6 | 11 | //Updates motors on set intervals |
| dereklmc | 41:40e432c5cbe6 | 12 | DEBUG(pc.printf("Updating motors on interval %f.\r\n", quadCommand::MOTOR_UPDATE/1000.0f);) |
| dereklmc | 41:40e432c5cbe6 | 13 | motorProcess.attach(&quad, &quadCommand::updateMotors, quadCommand::MOTOR_UPDATE/1000.0f); |
| dereklmc | 8:72791d8c36b7 | 14 | |
| dereklmc | 41:40e432c5cbe6 | 15 | quad.run(); // Start quadCommand running. |
| gabdo | 0:8681037b9a18 | 16 | } |
| gabdo | 0:8681037b9a18 | 17 |
