Skip to content

Commit

Permalink
Update GPS Positional DOP using polling timer (#4106)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored Aug 3, 2024
1 parent 66fb5ff commit c1bc967
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/js/tabs/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,7 @@ gps.initialize = async function (callback) {
$('div.mag_declination').hide();
}

if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
const positionalDop = FC.GPS_DATA.positionalDop / 100;
$('.GPS_info td.positionalDop').text(`${positionalDop.toFixed(2)}`);
} else {
if (semver.lt(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
$('.GPS_info td.positionalDop').parent().hide();
}

Expand Down Expand Up @@ -346,6 +343,11 @@ gps.initialize = async function (callback) {
$('.GPS_info td.sats').text(FC.GPS_DATA.numSat);
$('.GPS_info td.distToHome').text(`${FC.GPS_DATA.distanceToHome} m`);

if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
const positionalDop = FC.GPS_DATA.positionalDop / 100;
$('.GPS_info td.positionalDop').text(`${positionalDop.toFixed(2)}`);
}

updateSignalStrengths();

let gpsFoundPosition = false;
Expand Down

0 comments on commit c1bc967

Please sign in to comment.