Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Revision 62:31ed14d02627, committed 2014-04-27
- Comitter:
- krobertson
- Date:
- Sun Apr 27 21:52:20 2014 +0000
- Parent:
- 61:aa32e17f6801
- Child:
- 65:8e491bde6629
- Commit message:
- send back location after getting commands
Changed in this revision
handle/handleCamera.cpp | Show annotated file Show diff for this revision Revisions of this file |
handle/handleCommand.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/handle/handleCamera.cpp Sun Apr 27 02:31:00 2014 +0000 +++ b/handle/handleCamera.cpp Sun Apr 27 21:52:20 2014 +0000 @@ -23,20 +23,11 @@ sID=getPS().getSuperID(); //DH::Locs().getC().getLat()=40.006145f; //DH::Locs().getC().getLon()=-105.262173; - DH::Locs().getC().getAlt()=5; - DH::Locs().getC().getHeading()=5; - DH::Locs().getC().getTilt()=5; - getPS().openConnection(); - getPS().sendPacket(0,NULL,0,PT_EMPTY); - getPS().sendPacket(sID,NULL,0,PT_IMAGEHEAD); - getPS().sendPacket(sID,(char*)(&DH::Locs().getC().getLoc()),sizeof(DataLocation)); - getPS().sendPacket(sID,NULL,0,PT_END); - getPS().closeConnection(); - wait_us(1000000); + // Send image - sID=getPS().getSuperID(); + //sID=getPS().getSuperID(); getPS().openConnection(); getPS().sendPacket(0,NULL,0,PT_EMPTY); getPS().sendPacket(sID,NULL,0,PT_IMAGE); @@ -62,7 +53,19 @@ i+=bytesRead; } getPS().sendPacket(sID,backBuffer,bloc); + getPS().sendPacket(sID,NULL,0,PT_END); + getPS().closeConnection(); + + wait_us(1000000); + outputDevice.printf("Image End\n",size); + DH::Locs().getC().getAlt()=5; + DH::Locs().getC().getHeading()=5; + DH::Locs().getC().getTilt()=5; + getPS().openConnection(); + getPS().sendPacket(0,NULL,0,PT_EMPTY); + getPS().sendPacket(sID,NULL,0,PT_IMAGEHEAD); + getPS().sendPacket(sID,(char*)(&DH::Locs().getC().getLoc()),sizeof(DataLocation)); getPS().sendPacket(sID,NULL,0,PT_END); getPS().closeConnection(); cam.resumeVideo();
--- a/handle/handleCommand.cpp Sun Apr 27 02:31:00 2014 +0000 +++ b/handle/handleCommand.cpp Sun Apr 27 21:52:20 2014 +0000 @@ -60,13 +60,10 @@ } USB::getSerial().printf("Done Getting Commands. Closing Connection.\r\n"); getPS().closeConnection(); - if(location_requested){ + //if(location_requested){ USB::getSerial().printf("sending location...\r\n"); GPSHandle::getGPSHand().sendLoc(); - } - if(waypoints_sent){ - - } + //} } void CommandHandle::locationRequest(){