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.
Diff: gnss_operations.cpp
- Revision:
- 32:36bf0ff17131
- Parent:
- 31:9a1ce433f062
- Child:
- 33:75163fa7e453
--- 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);