added gy80 dcm
Dependencies: mbed DCM_AHRS_GY80 PID MMA8451Q
Fork of quadCommand by
Diff: quadCommand/quadCommand.cpp
- Revision:
- 51:60258b84ebab
- Parent:
- 50:197a18e49eb4
- Child:
- 52:24590a45b807
--- a/quadCommand/quadCommand.cpp Mon Jun 10 05:04:53 2013 +0000 +++ b/quadCommand/quadCommand.cpp Mon Jun 10 05:57:47 2013 +0000 @@ -12,7 +12,8 @@ pidYaw(1.5,0.1,1.20,DEFAULT_WINDUP_GUARD) { motorProcess.attach(this, &quadCommand::updateMotors, MOTOR_UPDATE/1000); - sensorProcess.attach( this, &quadCommand::updateCurrent, SENSSOR_DELAY /1000 ); + sensorProcess.attach( this, &quadCommand::updateCurrent, SENSSOR_DELAY/1000 ); + // sendProcess.attach( this, &quadCommand::sendTelemetry, SEND_DELAY/1000 ); myCom = new com( TXPIN, RXPIN ); // Setup com object. world = new sensors(); // Setup the sensors. @@ -36,12 +37,8 @@ { while(1) { - DEBUG(pc.printf("\r\n------------------- IN RUN ---------------------\r\n");) - if( myCom->isData() ) - rxInput(); - - sendTelemetry(); + rxInput(); } } @@ -106,8 +103,8 @@ void quadCommand::sendTelemetry() { - myCom->write( 2, (short)(currentPitch * 900 / 10 ) ); - myCom->write( 3, (short)(currentRoll * 900 / 10 ) ); + myCom->write( 2, (short)(currentPitch * 90) ); + myCom->write( 3, (short)(currentRoll * 90) ); } /************************** updateCurrent() ******************************/