QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

Files at this revision

API Documentation at this revision

Comitter:
dylanembed123
Date:
Sat Apr 26 04:03:20 2014 +0000
Parent:
47:fd373c4ea831
Child:
50:030da136eacb
Child:
53:d785a6f6abdd
Commit message:
Yet again trying to fix add;

Changed in this revision

handle/dataLocation.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/handle/dataLocation.cpp	Sat Apr 26 04:01:13 2014 +0000
+++ b/handle/dataLocation.cpp	Sat Apr 26 04:03:20 2014 +0000
@@ -41,10 +41,11 @@
 void LocHolder::add(LHType type,DataLocation newLoc){
     // Set the current index to the current size
     //getI(type)=getI(type,LHIType_size);
-    inc(type);
     // Increment size
     unsigned int newSize=getI(type,LHIType_size)+1;
     getI(type,LHIType_size)=newSize>MAXNUMLOCS?MAXNUMLOCS:newSize;
+    // Increment type using new size
+    inc(type);
     // Assign current index
     getC(type,getI(type))=newLoc;
 }