added gy80 dcm
Dependencies: mbed DCM_AHRS_GY80 PID MMA8451Q
Fork of quadCommand by
Diff: quadCommand/quadCommand.cpp
- Revision:
- 4:ce6ad16337c5
- Parent:
- 1:9b90e7de6e09
- Child:
- 8:72791d8c36b7
--- a/quadCommand/quadCommand.cpp Sun Jun 09 22:33:11 2013 +0000 +++ b/quadCommand/quadCommand.cpp Sun Jun 09 22:59:11 2013 +0000 @@ -26,13 +26,6 @@ { if( myCom->isData() ) rxInput(); - - myCom->write( 3, world->getAbsoluteY()); - wait( .05); - //updatePosition(); - - // if( globalUpdate ) - // txPosition(); } } @@ -58,42 +51,4 @@ myMotors[ 3 ]->setSpeed( rxThrottle - rxPitch - rxRoll ); // Motor 4 delete[] command; -} - -void quadCommand::updatePosition() -{ - float temp; - - temp = world->getAbsoluteX(); - if( temp != currentRoll ) - { - currentRoll = temp; - updatedRoll = true; - globalUpdate = true; - } - - temp = world->getAbsoluteY(); - if( temp != currentPitch ) - { - currentPitch = temp; - updatedPitch = true; - globalUpdate = true; - } -} - -void quadCommand::txPosition() -{ - if( updatedRoll ) - { - myCom->write( 3, currentRoll); - updatedRoll = false; - } - - if( updatedPitch ) - { - myCom->write( 2, currentPitch); - updatedPitch = false; - } - - globalUpdate = false; } \ No newline at end of file