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

Mission control WP altitude crash fix #2137

Merged
Merged
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
14 changes: 7 additions & 7 deletions tabs/mission_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ TABS.mission_control.initialize = function (callback) {
saveSettings();
settings = missionPlannerSettings;
}
refreshSettings();
refreshSettings();
}

function saveSettings() {
Expand Down Expand Up @@ -1709,7 +1709,7 @@ TABS.mission_control.initialize = function (callback) {
// * @param {Object=} opt_options Control options.
// */
app.PlannerMultiMissionControl = function (opt_options) {

var options = opt_options || {};
var button = document.createElement('button');

Expand Down Expand Up @@ -2214,7 +2214,7 @@ TABS.mission_control.initialize = function (callback) {
// Update Alt display in meters on ALT field keypress up
//////////////////////////////////////////////////////////////////////////
$('#pointAlt').on('keyup', () => {
let altitudeMeters = app.ConvertCentimetersToMeters($(this).val());
let altitudeMeters = app.ConvertCentimetersToMeters($('#pointAlt').val());
$('#altitudeInMeters').text(` ${altitudeMeters}m`);
});

Expand Down Expand Up @@ -2397,7 +2397,7 @@ TABS.mission_control.initialize = function (callback) {
$('#pointP3Alt').on('change', function (event) {
if (selectedMarker) {
var P3Value = selectedMarker.getP3();

if (disableMarkerEdit) {
changeSwitchery($('#pointP3Alt'), TABS.mission_control.isBitSet(P3Value, MWNP.P3.ALT_TYPE));
}
Expand Down Expand Up @@ -2491,7 +2491,7 @@ TABS.mission_control.initialize = function (callback) {

var P3Value = TABS.mission_control.setBit(selectedMarker.getP3(), MWNP.P3.USER_ACTION_1, $('#pointP3UserAction1').prop("checked"));
selectedMarker.setP3(P3Value);

mission.updateWaypoint(selectedMarker);
mission.update(singleMissionActive());
redrawLayer();
Expand All @@ -2518,7 +2518,7 @@ TABS.mission_control.initialize = function (callback) {
if (disableMarkerEdit) {
changeSwitchery($('#pointP3UserAction3'), TABS.mission_control.isBitSet(selectedMarker.getP3(), MWNP.P3.USER_ACTION_3));
}

var P3Value = TABS.mission_control.setBit(selectedMarker.getP3(), MWNP.P3.USER_ACTION_3, $('#pointP3UserAction3').prop("checked"));
selectedMarker.setP3(P3Value);

Expand All @@ -2533,7 +2533,7 @@ TABS.mission_control.initialize = function (callback) {
if (disableMarkerEdit) {
changeSwitchery($('#pointP3UserAction4'), TABS.mission_control.isBitSet(selectedMarker.getP3(), MWNP.P3.USER_ACTION_4));
}

var P3Value = TABS.mission_control.setBit(selectedMarker.getP3(), MWNP.P3.USER_ACTION_4, $('#pointP3UserAction4').prop("checked"));
selectedMarker.setP3(P3Value);

Expand Down
Loading