Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Revision 47:fd373c4ea831, committed 2014-04-26
- Comitter:
- dylanembed123
- Date:
- Sat Apr 26 04:01:13 2014 +0000
- Parent:
- 46:f89fc45811a1
- Child:
- 48:dc9269ce9a79
- Commit message:
- Fix add command for being called more times
Changed in this revision
handle/dataLocation.cpp | Show annotated file Show diff for this revision Revisions of this file |
handle/mavcommands.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/handle/dataLocation.cpp Fri Apr 25 23:50:51 2014 +0000 +++ b/handle/dataLocation.cpp Sat Apr 26 04:01:13 2014 +0000 @@ -40,9 +40,11 @@ void LocHolder::add(LHType type,DataLocation newLoc){ // Set the current index to the current size - getI(type)=getI(type,LHIType_size); + //getI(type)=getI(type,LHIType_size); + inc(type); // Increment size - getI(type,LHIType_size)++; + unsigned int newSize=getI(type,LHIType_size)+1; + getI(type,LHIType_size)=newSize>MAXNUMLOCS?MAXNUMLOCS:newSize; // Assign current index getC(type,getI(type))=newLoc; }
--- a/handle/mavcommands.cpp Fri Apr 25 23:50:51 2014 +0000 +++ b/handle/mavcommands.cpp Sat Apr 26 04:01:13 2014 +0000 @@ -5,6 +5,17 @@ MavCmd* MavCmd::mavcmd=NULL; +static void fixLatLon(double& latitude,double& longitude){ + int degrees; + double minutes; + degrees = (int)(latitude/100); + minutes = latitude - degrees*100; + latitude = degrees + minutes/60; + degrees = (int)(longitude/100); + minutes = longitude - degrees*100; + longitude = degrees + minutes/60; +} + void MavCmd::setupCmds(){ // Request item list req.targSys=1;req.targComp=1;