diff --git a/src/css/main.less b/src/css/main.less index 9fb6459c28..f0e1f4b0e1 100644 --- a/src/css/main.less +++ b/src/css/main.less @@ -1730,14 +1730,14 @@ dialog { border-radius: 3px; color: #fff; font-size: 10px; - &.search { + &.low { background-color: #808080; } - &.locked { + &.notReady { background-color: #ffcc3f; } - &.almostReady { - background-color: #ffa500; + &.locked { + background-color: #ff9500; } &.ready { background-color: #008000; diff --git a/src/js/tabs/gps.js b/src/js/tabs/gps.js index 5f36e77345..cb8aef46e7 100644 --- a/src/js/tabs/gps.js +++ b/src/js/tabs/gps.js @@ -192,7 +192,7 @@ 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']; + // 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 +200,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); @@ -250,6 +250,7 @@ gps.initialize = async function (callback) { for (let i = 0; i < channels; i++) { let rowContent = ''; + let usedColor = ''; if (FC.GPS_DATA.chn[i] <= 6) { rowContent += `${gnssArray[FC.GPS_DATA.chn[i]]}`; } else { @@ -266,35 +267,38 @@ 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 healthy = i18n.getMessage(healthyArray[(FC.GPS_DATA.quality[i] & 0x30) >> 4]); // Add color to the text - // 1st column: unused = red, used = green - // 2nd column: unknown = red, non healthy = grey, healthy = orange - // 3d column: no signal = red, unusable = red, searching = grey, locked = yellow and fully locked = orange - - if (used.startsWith(i18n.getMessage('gnssUsedUsed'))) { - used = ` ${used} `; - } else { - used = `${used}`; - } - + // 2nd column: no signal = red, unusable = red, searching = red, locked = yellow and fully locked = green if (quality.startsWith(i18n.getMessage('gnssQualityFullyLocked'))) { - quality = `${quality}`; + usedColor = 'locked'; + quality = `${quality}`; } else { if (quality.startsWith(i18n.getMessage('gnssQualityLocked'))) { + usedColor = 'notReady'; quality = `${quality}`; } else { + usedColor = ''; if (quality.startsWith(i18n.getMessage('gnssQualitySearching'))) { - quality = `${quality}`; + quality = `${quality}`; } else { quality = `${quality}`; } } } + // 1st column: unused = red, used = green + if (used.startsWith(i18n.getMessage('gnssUsedUsed'))) { + used = ` ${used} `; + } else { + used = `${used}`; + } + + /* + // 3d column: unknown = red, non healthy = grey, healthy = orange if (healthy.startsWith(i18n.getMessage('gnssHealthyHealthy'))) { - healthy = `${healthy}`; + healthy = `${healthy}`; } else { if (healthy.startsWith(i18n.getMessage('gnssHealthyUnhealthy'))) { healthy = `${healthy}`; @@ -302,8 +306,10 @@ gps.initialize = async function (callback) { healthy = `${healthy}`; } } - rowContent += `${used} | ${healthy} | ${quality}`; + */ + + rowContent += `${used} | ${quality}`; } eSsTable.append(`${rowContent}`); }