Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Diff: handle/handleCamera.cpp
- Revision:
- 15:e3e03a9df89e
- Parent:
- 14:6be57da62283
- Child:
- 16:4f5d20b87dc3
--- a/handle/handleCamera.cpp Thu Apr 10 02:19:07 2014 +0000 +++ b/handle/handleCamera.cpp Thu Apr 10 05:38:45 2014 +0000 @@ -15,11 +15,26 @@ outputDevice.printf("Failed to snap!\n"); while(1){} } - unsigned int sID=getPS().getSuperID(); + unsigned int sID; + + // Send location + 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().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); + + // Send image + sID=getPS().getSuperID(); getPS().sendPacket(0,NULL,0,PT_EMPTY); getPS().sendPacket(sID,NULL,0,PT_IMAGE); int size=cam.frameLength(); - outputDevice.printf("Image Start %d\n",size); + outputDevice.printf("Image Start %d %d\n",size,sizeof(PacketStruct)); int i; char backBuffer[PACKETSIZE]; int bloc=0;