Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of dgps by
Diff: main.cpp
- Revision:
- 14:6be57da62283
- Parent:
- 13:a6d3cf2b018e
- Child:
- 15:e3e03a9df89e
diff -r a6d3cf2b018e -r 6be57da62283 main.cpp --- a/main.cpp Mon Apr 07 01:30:04 2014 +0000 +++ b/main.cpp Thu Apr 10 02:19:07 2014 +0000 @@ -103,6 +103,29 @@ int main() { + //getPS().sendPacket(0,NULL,0,PT_EMPTY);getPS().sendPacket(55,NULL,0,PT_IMAGE); + /* + char output[256];for(int i=0;i<256;i++){output[i]=i;}getPS().sendPacket(0,NULL,0,PT_IMAGE);getPS().sendPacket(55,output,256);getPS().sendPacket(55,output,5);getPS().sendPacket(55,NULL,0,PT_END); + PacketStruct* packs[4]; + for(int i=0;i<4;i){ + packs[i]=getPS().getNextPacket(); + if(packs[i]!=NULL)i++; + } + for(int i=0;i<4;i++){ + PacketStruct* pack=packs[i]; + if(pack!=NULL){ + USB::getSerial().printf("Got Packet!\n"); + USB::getSerial().printf(" > %d\n",pack->type); + for(int i=0;i<sizeof(PacketStruct);i++){ + USB::getSerial().printf("%d\n",((char*)pack)[i]); + } + USB::getSerial().printf("\n",pack->type); + }else{ + //USB::getSerial().printf("."); + } + } + while(true){} + */ //getPS().sendPacket(55,NULL,0,PT_IMAGE);char output[256];for(int i=0;i<256;i++){output[i]=i;}getPS().sendPacket(55,output,256,PT_IMAGE);getPS().sendPacket(55,output,5,PT_IMAGE);getPS().sendPacket(55,NULL,0,PT_END);while(true){} ImageHandle imageHand; GPSHandle gpsHand; @@ -112,11 +135,12 @@ //USB::getSerial().printf("Test\n"); //XBEE::getSerial().printf("ABC\n"); //} + USB::getSerial().printf("Check GPS\n"); while(1){ // Run image handler - imageHand.run(); + //imageHand.run(); // Run GPS handler - //gpsHand.run(); + gpsHand.run(); } /// Main Loop while(true) {