Skip to content

Commit

Permalink
Add MSP2_UBLOX_REQUEST_SV_INFO (#3689)
Browse files Browse the repository at this point in the history
* Add MSP2_GPS_REQUEST_SV_INFO

* Rename MSP

* Add console message for request
  • Loading branch information
haslinghuis authored Dec 24, 2023
1 parent 8106a0c commit 9117326
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/js/msp/MSPCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ const MSPCodes = {
MSP2_GET_LED_STRIP_CONFIG_VALUES: 0x3008,
MSP2_SET_LED_STRIP_CONFIG_VALUES: 0x3009,
MSP2_SENSOR_CONFIG_ACTIVE: 0x300A,
MSP2_UBLOX_REQUEST_SV_INFO: 0x300B,

// MSP2_GET_TEXT and MSP2_SET_TEXT variable types
PILOT_NAME: 1,
Expand Down
4 changes: 4 additions & 0 deletions src/js/msp/MSPHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,10 @@ MspHelper.prototype.process_data = function(dataHandler) {
console.log('DSHOT command sent');
break;

case MSPCodes.MSP2_UBLOX_REQUEST_SV_INFO:
console.log('UBLOX SV info requested');
break;

case MSPCodes.MSP_MULTIPLE_MSP:

let hasReturnedSomeCommand = false; // To avoid infinite loops
Expand Down
5 changes: 5 additions & 0 deletions src/js/tabs/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ gps.initialize = async function (callback) {

await MSP.promise(MSPCodes.MSP_GPS_CONFIG);

// GPS SV info request added in 1.46 for UBLOX protocol
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46) && FC.GPS_CONFIG.provider === 1) {
await MSP.promise(MSPCodes.MSP2_UBLOX_REQUEST_SV_INFO);
}

load_html();

function load_html() {
Expand Down

0 comments on commit 9117326

Please sign in to comment.