Skip to content

Commit

Permalink
Merge branch 'Custom-Motor-Mixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Keeble authored and Gary Keeble committed Jun 13, 2016
2 parents a455b79 + a0cb2e7 commit 7a9a541
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/user_settings_dialog.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
function UserSettingsDialog(dialog, onSave) {

// Private Variables
var that = this; // generic pointer back to this function
var mixerConfiguration = 3; // mixerConfiguration starts at 1;

var customMix = null;
Expand Down Expand Up @@ -65,7 +64,7 @@ function UserSettingsDialog(dialog, onSave) {
return settings;
}

var availableMotors; // motors that appear in the log file
var availableMotors =[]; // motors that appear in the log file
function getAvailableMotors(flightLog) {

var fieldNames = flightLog.getMainFieldNames();
Expand Down Expand Up @@ -141,10 +140,13 @@ function UserSettingsDialog(dialog, onSave) {

function mixerListSelection(val) {

if(val===null) val=3; // default for invalid values
if(val==null) val=3; // default for invalid values

mixerConfiguration = val;

$('.mixerPreview img').attr('src', './images/motor_order/' + mixerList[val - 1].image + '.svg');
if(val>0 && val <= mixerList.length) {
$('.mixerPreview img').attr('src', './images/motor_order/' + mixerList[val - 1].image + '.svg');
}

buildMotorList(mixerConfiguration); // rebuild the motor list based upon the current selection
}
Expand Down Expand Up @@ -195,6 +197,6 @@ function UserSettingsDialog(dialog, onSave) {

dialog.modal('show');

}
};

}

0 comments on commit 7a9a541

Please sign in to comment.