Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS tab with same design for lat / lon as on Setup tab #3516

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2726,14 +2726,19 @@
"gpsAltitude": {
"message": "Altitude:"
},
"gpsLatLon": {
"message": "Current Latitude / Longitude:",
"description": "Show GPS position - Latitude / Longitude"
},
"gpsHeading": {
"message": "Heading:"
},
"gpsSpeed": {
"message": "Speed:"
},
"gpsSats": {
"message": "Sats:"
"message": "Number of Satellites:",
"description": "Show number of fixed GPS Satellites"
},
"gpsDistToHome": {
"message": "Dist to Home:"
Expand Down
3 changes: 1 addition & 2 deletions src/js/tabs/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ gps.initialize = async function (callback) {

const gspUnitText = i18n.getMessage('gpsPositionUnit');
$('.GPS_info td.alt').text(`${alt} m`);
$('.GPS_info td.lat a').prop('href', url).text(`${lat.toFixed(4)} ${gspUnitText}`);
$('.GPS_info td.lon a').prop('href', url).text(`${lon.toFixed(4)} ${gspUnitText}`);
$('.GPS_info td.latLon a').prop('href', url).text(`${lat.toFixed(4)} deg / ${lon.toFixed(4)} deg`);
$('.GPS_info td.heading').text(`${headingDeg.toFixed(4)} ${gspUnitText}`);
$('.GPS_info td.speed').text(`${FC.GPS_DATA.speed} cm/s`);
$('.GPS_info td.sats').text(FC.GPS_DATA.numSat);
Expand Down
20 changes: 8 additions & 12 deletions src/tabs/gps.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,30 +90,26 @@
<td><span class="colorToggle" i18n="gpsFixFalse"></span></td>
</tr>
<tr>
<td i18n="gpsAltitude"></td>
<td class="alt">0 m</td>
<td i18n="gpsSats"></td>
<td class="sats">0</td>
</tr>
<tr>
<td i18n="gpsLat"></td>
<td class="lat"><a href="#" target="_blank">0.0000 deg</a></td>
<td i18n="gpsAltitude"></td>
<td class="alt">0 m</td>
</tr>
<tr>
<td i18n="gpsLon"></td>
<td class="lon"><a href="#" target="_blank">0.0000 deg</a></td>
<td i18n="gpsSpeed"></td>
<td class="speed">0 cm/s</td>
</tr>
<tr>
<td i18n="gpsHeading"></td>
<td class="heading"><a href="#" target="_blank">0.0000 deg</a></td>
</tr>
<tr>
<td i18n="gpsSpeed"></td>
<td class="speed">0 cm/s</td>
<td i18n="gpsLatLon"></td>
<td class="latLon"><a href="#" target="_blank">0.0000 deg</a></td>
</tr>
<tr>
<td i18n="gpsSats"></td>
<td class="sats">0</td>
</tr>
<tr class="noboarder">
<td i18n="gpsDistToHome"></td>
<td class="distToHome"></td>
</tr>
Expand Down