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:
- 31:9a1ce433f062
- Parent:
- 27:405a5e611635
- Child:
- 32:36bf0ff17131
--- a/gnss_operations.cpp Wed Apr 03 11:53:35 2019 +0500
+++ b/gnss_operations.cpp Wed Apr 03 16:32:30 2019 +0500
@@ -192,6 +192,35 @@
return (conf == 0) ? 0 : 1;
}
+int GnssOperations::enable_ubx_navx5()
+{
+ int conf = RETRY;
+ conf = RETRY;
+ int length =0;
+ //convert unsigned int acc to hex
+ //ask if positioning mask or time accuracy mask
+ unsigned char ubx_cfg_navx5[]={0x28, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x03, 0x02, 0x03, 0x20, 0x06, 0x00, 0x01, 0x01, 0x00, 0x00, 0x90,
+ 0x07, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x64, 0x64, 0x00, 0x00, 0x01, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF9, 0xF7};
+
+ while(conf)
+ {
+ length = GnssSerial::sendUbx(0x06, 0x23, ubx_cfg_navx5, sizeof(ubx_cfg_navx5));
+ if(length >= (int)(sizeof(ubx_cfg_navx5) + UBX_FRAME_SIZE))
+ {
+ SEND_LOGGING_MESSAGE("ubx_cfg_navx5 was enabled\r\n");
+ wait(1);
+ break;
+ }
+ else
+ {
+ SEND_LOGGING_MESSAGE("enabling ubx_cfg_navx5...\r\n");
+ conf = conf - 1;
+ }
+ }
+
+ return (conf == 0) ? 0 : 1;
+}
+
/**
* Enabling UBX-ODOMETER using UBX-CFG-ODO
* @param return SUCCESS: 1
@@ -514,6 +543,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};
this->_send(CFG_PMS, sizeof(CFG_PMS));
wait(1);
@@ -527,6 +557,9 @@
this->_send(CFG_NAV5, sizeof(CFG_NAV5));
wait(1);
+ this->_send(CFG_NAVX5, sizeof(CFG_NAVX5));
+ wait(1);
+
return true;
}