This class provides an API to communicate with a u-blox GNSS chip. The files here were originally part of the C027_Support library (https://developer.mbed.org/teams/ublox/code/C027_Support/ at revision 138:dafbbf31bf76) but have been separated out, primarily for use on the u-blox C030 board where the cellular interace portion of the C027_Support library will instead be provided through the new mbed Cellular API.
Dependents: example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more
Revision 32:36bf0ff17131, committed 2019-04-24
- Comitter:
- fahim.alavi@u-blox.com
- Date:
- Wed Apr 24 17:55:48 2019 +0500
- Parent:
- 31:9a1ce433f062
- Child:
- 33:75163fa7e453
- Commit message:
- Warnings removed and message NAVX5 corrected
Changed in this revision
gnss_operations.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/gnss_operations.cpp Wed Apr 03 16:32:30 2019 +0500 +++ b/gnss_operations.cpp Wed Apr 24 17:55:48 2019 +0500 @@ -170,7 +170,7 @@ //convert unsigned int acc to hex //ask if positioning mask or time accuracy mask unsigned char ubx_cfg_nav5[]={0xFF, 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, - 0x0A, 0x00, 0xFA, 0x00,0xFA, 0x00, EXTRACT_BYTE(0, FIRST_BYTE, acc), EXTRACT_BYTE(1, SECOND_BYTE, acc), + 0x0A, 0x00, 0xFA, 0x00,0xFA, 0x00, (unsigned char)EXTRACT_BYTE(0, FIRST_BYTE, acc), (unsigned char)EXTRACT_BYTE(1, SECOND_BYTE, acc), 0x5E, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00}; while(conf) @@ -414,9 +414,9 @@ int GnssOperations::cfg_batch_feature(tUBX_CFG_BATCH *obj) { int length =0; - const unsigned char cfg_batch_feature[] = {0x00, 0x01, EXTRACT_BYTE(0, FIRST_BYTE, obj->bufSize), - EXTRACT_BYTE(1, SECOND_BYTE, obj->bufSize), EXTRACT_BYTE(0, FIRST_BYTE, obj->notifThrs), - EXTRACT_BYTE(1, SECOND_BYTE, obj->notifThrs), obj->pioId, 0x00}; + const unsigned char cfg_batch_feature[] = {0x00, 0x01, (unsigned char)EXTRACT_BYTE(0, FIRST_BYTE, obj->bufSize), + (unsigned char) EXTRACT_BYTE(1, SECOND_BYTE, obj->bufSize), (unsigned char) EXTRACT_BYTE(0, FIRST_BYTE, obj->notifThrs), + (unsigned char) EXTRACT_BYTE(1, SECOND_BYTE, obj->notifThrs), obj->pioId, 0x00}; length = GnssSerial::sendUbx(0x06, 0x93, cfg_batch_feature, sizeof(cfg_batch_feature)); @@ -532,6 +532,11 @@ length = GnssSerial::sendUbx(0x06, 0x08, full_power_building_level_rate, sizeof(full_power_building_level_rate)); wait(1); break; + case AVAILABLE_OPERATION: + default : { + SEND_LOGGING_MESSAGE("Invalid power mode"); + } + break; } return (length >= (int)(sizeof(semi_continuous_pms) + UBX_FRAME_SIZE)) ? 1 : 0; @@ -543,7 +548,7 @@ unsigned char CFG_PM2[] = {0xB5, 0x62, 0x06, 0x3B, 0x00, 0x00, 0x41, 0xC9}; unsigned char CFG_RATE[] = {0xB5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x0E, 0x30}; unsigned char CFG_NAV5[] = {0xB5, 0x62, 0x06, 0x24, 0x00, 0x00, 0x2A, 0x84}; - unsigned char CFG_NAVX5[] = {0xB5, 0x62, 0x06, 0x24, 0x00, 0x00, 0x29, 0x81}; + unsigned char CFG_NAVX5[] = {0xB5, 0x62, 0x06, 0x23, 0x00, 0x00, 0x29, 0x81}; this->_send(CFG_PMS, sizeof(CFG_PMS)); wait(1);