Skip to content

Commit

Permalink
Merge pull request #2318 from iNavFlight/mmosca-edit-safehome-fix
Browse files Browse the repository at this point in the history
fix safehome lat/lon edits
  • Loading branch information
mmosca authored Jan 21, 2025
2 parents 150db80 + 11c1bc5 commit baf9af6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tabs/mission_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -3224,8 +3224,8 @@ TABS.mission_control.initialize = function (callback) {
});

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


$('#safehomeLongitude').on('change', event => {
if (selectedFwApproachSh) {
selectedFwApproachSh.setLon(Math.round(Number($(event.currentTarget).val()) * 1e7));
if (selectedSafehome && selectedFwApproachSh) {
selectedSafehome.setLon(Math.round(Number($(event.currentTarget).val()) * 1e7));
renderSafeHomeOptions();
cleanSafehomeLayers();
renderSafehomesOnMap();
Expand Down

0 comments on commit baf9af6

Please sign in to comment.