Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Revision 51:d6b64ac3c30d, committed 2014-04-26
- Comitter:
- krobertson
- Date:
- Sat Apr 26 06:49:37 2014 +0000
- Parent:
- 50:030da136eacb
- Child:
- 55:c2c10a521874
- Commit message:
- It mother fucking worked! Just walked the path
Changed in this revision
--- a/adapt/xbee.h Sat Apr 26 04:26:48 2014 +0000 +++ b/adapt/xbee.h Sat Apr 26 06:49:37 2014 +0000 @@ -9,7 +9,7 @@ #define XBEEPINRX p10 /// Define Baud -#define XBEEBAUD 115200 +#define XBEEBAUD 57600 //115200 class XBEE{
--- a/handle/handleCommand.cpp Sat Apr 26 04:26:48 2014 +0000 +++ b/handle/handleCommand.cpp Sat Apr 26 06:49:37 2014 +0000 @@ -35,7 +35,7 @@ }else{ switch(pack_type){ case PT_STARTCOMMANDS: - USB::getSerial().printf("Start Commands\r\n"); + //USB::getSerial().printf("Start Commands\r\n"); startCommandsReceived = 1; break; case PT_ENDCOMMANDS:
--- a/handle/handleGPS.cpp Sat Apr 26 04:26:48 2014 +0000 +++ b/handle/handleGPS.cpp Sat Apr 26 06:49:37 2014 +0000 @@ -17,7 +17,7 @@ } char GPSHandle::readWaypoints(){ - USB::getSerial().printf("getting waypoitns\r\n"); + //USB::getSerial().printf("getting waypoitns\r\n"); PacketStruct pack; char rx_status = getPS().receivePacket(&pack); if(rx_status != 1){ @@ -27,10 +27,10 @@ Point* points = (Point*)pack.data; unsigned int num_points = pack.size; for(int i=0;i<num_points;i++){ - USB::getSerial().printf("Adding Waypoint: %f, %f\r\n",points[i].lat,points[i].lon); + //USB::getSerial().printf("Adding Waypoint: %f, %f\r\n",points[i].lat,points[i].lon); DH::Locs().add(LHType_targ,DataLocation(points[i].lat,points[i].lon,6.0f)); } - USB::getSerial().printf("Waypoints size: %d\r\n",DH::Locs().getI(LHType_targ,LHIType_size)); + //USB::getSerial().printf("Waypoints size: %d\r\n",DH::Locs().getI(LHType_targ,LHIType_size)); for(int i=0;i<DH::Locs().getI(LHType_targ,LHIType_size);i++){ DataLocation thisData=DH::Locs().getC(LHType_targ,i); USB::getSerial().printf("Waypoint %d: %f,%f\r\n",i,thisData.getLat(),thisData.getLon()); @@ -119,7 +119,7 @@ latitude = degrees + minutes/60; degrees = (int)(longitude/100); minutes = longitude - degrees*100; - longitude = degrees + minutes/60; + longitude = -1*(degrees + minutes/60); USB::getSerial().printf("\nMy GPS data: Lat: %f, Lon: %f, Alt: %f, Time:%f\r\n",latitude,longitude,altitude,timeS); DH::Locs().add(LHType_locs,DataLocation(latitude,longitude,altitude,timeS)); // USB::getSerial().printf("Current Time:%f\r\n",DH::Locs().getC().getTime());
--- a/packet.h Sat Apr 26 04:26:48 2014 +0000 +++ b/packet.h Sat Apr 26 06:49:37 2014 +0000 @@ -184,11 +184,12 @@ char temp; int total_rec_bytes = 0;//total bytes received for this packet. while(total_rec_bytes < sizeof(PacketStruct)){ - if((rx_ret = rx_ready_with_timeout()) != 1){ + if(!outputDevice.readable() && (rx_ret = rx_ready_with_timeout(&outputDevice, 3)) != 1){ USB::getSerial().printf("timed out waiting for packet. Received %d/%d bytes\r\n",total_rec_bytes,sizeof(PacketStruct)); return rx_ret; } temp = outputDevice.getc(); + //USB::getSerial().printf("%c ",temp); *(((char*)pack) + total_rec_bytes) = temp; total_rec_bytes++; }