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 gnss by
Diff: gnss.cpp
- Revision:
- 9:bfa9081e1d14
- Parent:
- 8:cff83b9f5093
- Child:
- 11:a04f7eeece23
--- a/gnss.cpp Fri May 18 13:29:00 2018 +0500 +++ b/gnss.cpp Mon May 21 17:18:35 2018 +0500 @@ -295,6 +295,10 @@ conf = conf - 1; } } + if(conf == 0) + { + return 1; + } unsigned char enable_ubx_nav_pvt[]={0x01, 0x07, 0x01}; conf = RETRY; @@ -536,6 +540,34 @@ return return_decoded_msg; } + +int GnssParser::ubx_request_batched_data(bool sendMonFirst) { + unsigned char ubx_log_retrieve_batch[]={0x00, 0x00, 0x00, 0x00}; + + ubx_log_retrieve_batch[1] = (sendMonFirst == true) ? 0x01 : 0x00; + + int conf = RETRY; + while(conf) + { + + int length = sendUbx(0x21, 0x10, ubx_log_retrieve_batch, sizeof(ubx_log_retrieve_batch)); + if(length >= (int)(sizeof(ubx_log_retrieve_batch) + UBX_FRAME_SIZE)) + { + wait(5); + break; + } + else + { + conf = conf - 1; + } + } + if(conf == 0) + { + return 1; + } + + return 0; +} const char GnssParser::_toHex[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' };