diff --git a/locales/en/messages.json b/locales/en/messages.json index 0e70dfe512..535c3c2b77 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -2805,7 +2805,7 @@ "message": "Sat ID" }, "gpsSignalStatusQly": { - "message": "Status / Quality" + "message": "Status     |  Quality" }, "gnssQualityNoSignal": { "message": "no signal" @@ -2829,7 +2829,7 @@ "message": "unused" }, "gnssUsedUsed": { - "message": "used" + "message": "USED " }, "gnssHealthyUnknown": { "message": "unknown" diff --git a/src/css/main.less b/src/css/main.less index e7f02b0d10..f0e1f4b0e1 100644 --- a/src/css/main.less +++ b/src/css/main.less @@ -1725,13 +1725,22 @@ dialog { } } .colorToggle { - background-color: #e60000; + background-color: #ff0000; padding: 2px 5px; border-radius: 3px; color: #fff; font-size: 10px; + &.low { + background-color: #808080; + } + &.notReady { + background-color: #ffcc3f; + } + &.locked { + background-color: #ff9500; + } &.ready { - background-color: #56ac1d; + background-color: #008000; } } .buildInfoBtn { diff --git a/src/js/tabs/gps.js b/src/js/tabs/gps.js index 7c3c893a44..67df120f82 100644 --- a/src/js/tabs/gps.js +++ b/src/js/tabs/gps.js @@ -192,7 +192,6 @@ gps.initialize = async function (callback) { const qualityArray = ['gnssQualityNoSignal', 'gnssQualitySearching', 'gnssQualityAcquired', 'gnssQualityUnusable', 'gnssQualityLocked', 'gnssQualityFullyLocked', 'gnssQualityFullyLocked', 'gnssQualityFullyLocked']; const usedArray = ['gnssUsedUnused', 'gnssUsedUsed']; - const healthyArray = ['gnssHealthyUnknown', 'gnssHealthyHealthy', 'gnssHealthyUnhealthy', 'gnssHealthyUnknown']; let alt = FC.GPS_DATA.alt; $('.GPS_info span.colorToggle').text(FC.GPS_DATA.fix ? i18n.getMessage('gpsFixTrue') : i18n.getMessage('gpsFixFalse')); @@ -200,7 +199,7 @@ gps.initialize = async function (callback) { const gspUnitText = i18n.getMessage('gpsPositionUnit'); $('.GPS_info td.alt').text(`${alt} m`); - $('.GPS_info td.latLon a').prop('href', url).text(`${lat.toFixed(4)} / ${lon.toFixed(4)} ${gspUnitText}`); + $('.GPS_info td.latLon a').prop('href', url).text(`${lat.toFixed(6)} / ${lon.toFixed(6)} ${gspUnitText}`); $('.GPS_info td.heading').text(`${magHeadingDeg.toFixed(4)} / ${gpsHeading.toFixed(4)} ${gspUnitText}`); $('.GPS_info td.speed').text(`${FC.GPS_DATA.speed} cm/s`); $('.GPS_info td.sats').text(FC.GPS_DATA.numSat); @@ -266,28 +265,28 @@ gps.initialize = async function (callback) { let quality = i18n.getMessage(qualityArray[FC.GPS_DATA.quality[i] & 0x7]); let used = i18n.getMessage(usedArray[(FC.GPS_DATA.quality[i] & 0x8) >> 3]); - let healthy = i18n.getMessage(healthyArray[(FC.GPS_DATA.quality[i] & 0x30) >> 4]); + let usedColor = ''; // Add color to the text - if (quality.startsWith('fully locked')) { + // 2nd column: no signal = red, unusable = red, searching = red, locked = yellow and fully locked = green + if (quality.startsWith(i18n.getMessage('gnssQualityFullyLocked'))) { + usedColor = 'locked'; quality = `${quality}`; + } else if (quality.startsWith(i18n.getMessage('gnssQualityLocked'))) { + usedColor = 'notReady'; + quality = `${quality}`; } else { quality = `${quality}`; } - if (used.startsWith('used')) { - used = `${used}`; + // 1st column: unused = red, used = green + if (used.startsWith(i18n.getMessage('gnssUsedUsed'))) { + used = ` ${used} `; } else { - used = `${used}`; + used = `${used}`; } - if (healthy.startsWith('healthy')) { - healthy = `${healthy}`; - } else { - healthy = `${healthy}`; - } - - rowContent += `${quality} | ${used} | ${healthy}`; + rowContent += `${used} | ${quality}`; } eSsTable.append(`${rowContent}`); } diff --git a/src/js/tabs/setup.js b/src/js/tabs/setup.js index 0bb8526caa..0bc83d9d65 100644 --- a/src/js/tabs/setup.js +++ b/src/js/tabs/setup.js @@ -435,7 +435,7 @@ setup.initialize = function (callback) { const lon = FC.GPS_DATA.lon / 10000000; const url = `https://maps.google.com/?q=${lat},${lon}`; const gpsUnitText = i18n.getMessage('gpsPositionUnit'); - $('.GPS_info td.latLon a').prop('href', url).text(`${lat.toFixed(4)} ${gpsUnitText} / ${lon.toFixed(4)} ${gpsUnitText}`); + $('.GPS_info td.latLon a').prop('href', url).text(`${lat.toFixed(4)} / ${lon.toFixed(4)} ${gpsUnitText}`); } function get_fast_data() {