diff --git a/src/js/tabs/gps.js b/src/js/tabs/gps.js index b6d8058eb7..129e875035 100644 --- a/src/js/tabs/gps.js +++ b/src/js/tabs/gps.js @@ -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(); } @@ -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;