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_operations.cpp
- Revision:
- 17:7adca4350499
- Parent:
- 15:cb9861f0f4d8
- Child:
- 18:119e7c15ff97
--- a/gnss_operations.cpp Mon Sep 03 14:39:27 2018 +0500 +++ b/gnss_operations.cpp Wed Sep 12 16:03:01 2018 +0500 @@ -87,9 +87,9 @@ int length =0; //convert unsigned int acc to hex //ask if positioning mask or time accuracy mask - unsigned char ubx_cfg_nav5[]={0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, EXTRACT_BYTE(0, FIRST_BYTE, acc), EXTRACT_BYTE(1, SECOND_BYTE, acc), - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00}; + 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), + 0x5E, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00}; while(conf) { @@ -341,7 +341,13 @@ unsigned char conservative_continuous_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; unsigned char full_power_pms[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - unsigned char full_power_rate[] = {0x06, 0x00, 0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; + unsigned char full_power_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; + + unsigned char full_power_block_level_pms[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + unsigned char full_power_block_level_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; + + unsigned char full_power_building_level_pms[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + unsigned char full_power_building_level_rate[] = {0xE8, 0x03, 0x01, 0x00, 0x01, 0x00}; switch (power_mode) { @@ -378,6 +384,18 @@ wait(5); length = GnssSerial::sendUbx(0x06, 0x08, full_power_rate, sizeof(full_power_rate)); break; + case FULL_POWER_BLOCK_LEVEL: + SEND_LOGGING_MESSAGE("Configuring FULL_POWER_BLOCK_LEVEL"); + length = GnssSerial::sendUbx(0x06, 0x86, full_power_block_level_pms, sizeof(full_power_block_level_pms)); + wait(5); + length = GnssSerial::sendUbx(0x06, 0x08, full_power_block_level_rate, sizeof(full_power_block_level_rate)); + break; + case FULL_POWER_BUILDING_LEVEL: + SEND_LOGGING_MESSAGE("Configuring FULL_POWER_BUILDING_LEVEL"); + length = GnssSerial::sendUbx(0x06, 0x86, full_power_building_level_pms, sizeof(full_power_building_level_pms)); + wait(5); + length = GnssSerial::sendUbx(0x06, 0x08, full_power_building_level_rate, sizeof(full_power_building_level_rate)); + break; } return (length >= (int)(sizeof(semi_continuous_pms) + UBX_FRAME_SIZE)) ? 1 : 0; }