1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 19:40:22 +03:00

Merge pull request #2318 from iNavFlight/mmosca-edit-safehome-fix

fix safehome lat/lon edits
This commit is contained in:
Marcelo Bezerra 2025-01-21 18:30:15 +01:00 committed by GitHub
commit baf9af6e73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3224,8 +3224,8 @@ TABS.mission_control.initialize = function (callback) {
}); });
$('#safehomeLatitude').on('change', event => { $('#safehomeLatitude').on('change', event => {
if (selectedFwApproachSh) { if (selectedSafehome && selectedFwApproachSh) {
selectedFwApproachSh.setLat(Math.round(Number($(event.currentTarget).val()) * 1e7)); selectedSafehome.setLat(Math.round(Number($(event.currentTarget).val()) * 1e7));
renderSafeHomeOptions(); renderSafeHomeOptions();
cleanSafehomeLayers(); cleanSafehomeLayers();
renderSafehomesOnMap(); renderSafehomesOnMap();
@ -3234,8 +3234,8 @@ TABS.mission_control.initialize = function (callback) {
$('#safehomeLongitude').on('change', event => { $('#safehomeLongitude').on('change', event => {
if (selectedFwApproachSh) { if (selectedSafehome && selectedFwApproachSh) {
selectedFwApproachSh.setLon(Math.round(Number($(event.currentTarget).val()) * 1e7)); selectedSafehome.setLon(Math.round(Number($(event.currentTarget).val()) * 1e7));
renderSafeHomeOptions(); renderSafeHomeOptions();
cleanSafehomeLayers(); cleanSafehomeLayers();
renderSafehomesOnMap(); renderSafehomesOnMap();