added gy80 dcm
Dependencies: mbed DCM_AHRS_GY80 PID MMA8451Q
Fork of quadCommand by
Revision 28:c6f6d6034d22, committed 2013-06-10
- Comitter:
- dereklmc
- Date:
- Mon Jun 10 00:39:01 2013 +0000
- Parent:
- 24:87d325eab299
- Child:
- 29:799ccb9be2be
- Child:
- 30:75caa2d18286
- Commit message:
- Added debug mode for serial out.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
quadCommand/debug.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jun 10 00:30:52 2013 +0000 +++ b/main.cpp Mon Jun 10 00:39:01 2013 +0000 @@ -1,11 +1,14 @@ #include "quadCommand.h" +#include "debug.h" int main() { + DEBUG(pc.printf("DEBUG ENABLED\r\n");) Ticker motorProcess; quadCommand quad; // Create quadCommand object. + + DEBUG(pc.printf("Initialized\r\n");) quad.run(); // Start quadCommand running. - motorProcess.attach(&quad, &quadCommand::updateMotors, quadCommand::MOTOR_UPDATE/1000.0f); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/quadCommand/debug.h Mon Jun 10 00:39:01 2013 +0000 @@ -0,0 +1,13 @@ +#ifndef __DEBUG__ +#define __DEBUG__ + +#include "mbed.h" + +#ifdef DEBUG_ENABLE +#define DEBUG(out) out +Serial pc(USBTX, USBRX); // tx, rx +#else +#define DEBUG(s) +#endif + +#endif \ No newline at end of file