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:
- 41:df156ae5631b
- Parent:
- 35:a6177e5ca00c
- Child:
- 42:c78632c16d54
diff -r 6f814050895d -r df156ae5631b main.cpp --- a/main.cpp Wed Apr 23 03:54:24 2014 +0000 +++ b/main.cpp Wed Apr 23 04:15:41 2014 +0000 @@ -133,12 +133,16 @@ getPS().openConnection(); getPS().closeConnection(); //Main Loop + int count = 0; while(1){ + USB::getSerial().printf("Running GPS...\r\n"); GPSHandle::getGPSHand().run(); USB::getSerial().printf("Requesting commands from egg...\r\n"); - wait_us(100000); - CommandHandle::getCommandHand().run(); - wait_us(100000); + if(count % 100 == 0){ + wait_us(100000); + CommandHandle::getCommandHand().run(); + wait_us(100000); + } if(GPSHandle::getGPSHand().if_image_location()){ USB::getSerial().printf("Taking picture and sending...\r\n"); wait_us(100000); @@ -146,10 +150,11 @@ USB::getSerial().printf("sent all data\r\n"); wait_us(100000); GPSHandle::getGPSHand().next_waypoint(); + wait_us(100000); }else{ USB::getSerial().printf("Not close enough to waypoint for image\r\n"); } - wait_us(1000000); + count++; //} // Run image handler