diff --git a/src/js/tabs/gps.js b/src/js/tabs/gps.js
index 3a56c6b677..240832ed6e 100644
--- a/src/js/tabs/gps.js
+++ b/src/js/tabs/gps.js
@@ -265,31 +265,18 @@ gps.initialize = async function (callback) {
rowContent += `
${FC.GPS_DATA.svid[i]} | `;
rowContent += ` | `;
- let quality = i18n.getMessage(qualityArray[FC.GPS_DATA.quality[i] & 0x7]);
- let used = i18n.getMessage(usedArray[(FC.GPS_DATA.quality[i] & 0x8) >> 3]);
- let usedColor = '';
+ const quality = i18n.getMessage(qualityArray[FC.GPS_DATA.quality[i] & 0x7]);
+ const used = i18n.getMessage(usedArray[(FC.GPS_DATA.quality[i] & 0x8) >> 3]);
// Add color to the text
- // 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}`;
- }
-
- // 1st column: unused = red, used = green
- if (used.startsWith(i18n.getMessage('gnssUsedUsed'))) {
- used = `${used}`;
- } else {
- used = `${used}`;
- }
-
- rowContent += `${used} |
- ${quality} | `;
+ const qualityColor = quality.startsWith(i18n.getMessage('gnssQualityFullyLocked')) ? 'ready' : quality.startsWith(i18n.getMessage('gnssQualityLocked')) ? 'locked' : 'low';
+ const qualityHtml = `${quality}`;
+
+ const usedColor = used.startsWith(i18n.getMessage('gnssUsedUsed')) ? 'ready' : 'low';
+ const usedHtml = `${used}`;
+
+ rowContent += `${usedHtml} |
+ ${qualityHtml} | `;
}
eSsTable.append(`${rowContent}
`);
}