Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Diff: handle/mavcommands.h
- Revision:
- 66:5d43988d100c
- Parent:
- 64:d4818fb7813c
--- a/handle/mavcommands.h Sun Apr 27 21:54:33 2014 +0000 +++ b/handle/mavcommands.h Mon May 05 13:20:35 2014 +0000 @@ -4,6 +4,8 @@ #include "packet.h" #include <algorithm> #include"handle/dataLocation.h" +#include"handle/handleCompass.h" + typedef struct MAV_REQUEST_LIST_S{ char targSys; char targComp; @@ -96,17 +98,19 @@ double cLat,cLon,cAlt; bool hasMoved(); bool moveValid; + double calibAlt; public: MavCmd():initialized(false){} char* getNextCmd(); void handleNextCmd(); void setupCmds(); - void setup(){if(!initialized){setupCmds();initialized=true;}} + void setup(){if(!initialized){setupCmds();initialized=true;calibAlt=0.0f;}} void run(){ setup(); readState=0; while(Mav::getSerial().readable()>0){char input=Mav::getSerial().getc();} - if(cLon!=0&&cLat!=0&&hasMoved()){ + //&&DH::Locs().getC(LHType_locs,DH::Locs().getI()).getLat()!=0&&DH::Locs().getC(LHType_locs,DH::Locs().getI()).getLon()!=0 + if(1==2&&DH::Locs().getI(LHType_targ,LHIType_size)>0&&hasMoved()){ USB::getSerial().printf("USING NEW WAYPOINT!!!\n"); // Issue count to init waypoint entry Mav::sendOutput(MAVLINK_MSG_ID_COUNT,(char*)&issueCount,sizeof(MAV_COUNT));