Commit 412d8a6b authored by Alexander van Saase's avatar Alexander van Saase
Browse files

Merge branch 'master' into avs-small-text-changes

parents 29471a72 c46a52ae
...@@ -2363,13 +2363,16 @@ ...@@ -2363,13 +2363,16 @@
"message": "Programming" "message": "Programming"
}, },
"tabAdvancedTuning": { "tabAdvancedTuning": {
"message": "Advanced tuning" "message": "Advanced Tuning"
}, },
"advancedTuningSave": { "advancedTuningSave": {
"message": "Save and Reboot" "message": "Save and Reboot"
}, },
"tabAdvancedTuningTitle": { "tabAdvancedTuningTitle": {
"message": "Advanced tuning" "message": "Advanced Tuning"
},
"tabAdvancedTuningGenericTitle": {
"message": "Generic settings"
}, },
"presetApplyHead": { "presetApplyHead": {
"message": "Applies following settings:" "message": "Applies following settings:"
...@@ -2549,19 +2552,31 @@ ...@@ -2549,19 +2552,31 @@
"message": "Max. throttle" "message": "Max. throttle"
}, },
"maxBankAngle": { "maxBankAngle": {
"message": "Max. bank angle [degrees]" "message": "Max. navigation bank angle [degrees]"
}, },
"maxBankAngleHelp": { "maxBankAngleHelp": {
"message": "Maximum banking angle in navigation modes. Constrained by maximum ROLL angle in PID tuning tab." "message": "Maximum banking angle in navigation modes. Constrained by maximum ROLL angle in PID tuning tab."
}, },
"maxClimbAngle": { "maxClimbAngle": {
"message": "Max. climb angle [degrees]" "message": "Max. navigation climb angle [degrees]"
}, },
"maxClimbAngleHelp": { "maxClimbAngleHelp": {
"message": "Maximum climb angle in navigation modes. Constrained by maximum PITCH angle in PID tuning tab." "message": "Maximum climb angle in navigation modes. Constrained by maximum PITCH angle in PID tuning tab."
}, },
"navManualClimbRate": {
"message": "Max. Alt-hold climb rate [cm/s]"
},
"navManualClimbRateHelp": {
"message": "Maximum climb/descent rate firmware is allowed when processing pilot input for ALTHOLD control mode [cm/s]"
},
"navAutoClimbRate": {
"message": "Max. navigation climb rate [cm/s]"
},
"navAutoClimbRateHelp": {
"message": "Maximum climb/descent rate that UAV is allowed to reach during navigation modes. [cm/s]"
},
"maxDiveAngle": { "maxDiveAngle": {
"message": "Max. dive angle [degrees]" "message": "Max. navigation dive angle [degrees]"
}, },
"maxDiveAngleHelp": { "maxDiveAngleHelp": {
"message": "Maximum dive angle in navigation modes. Constrained by maximum PITCH angle in PID tuning tab." "message": "Maximum dive angle in navigation modes. Constrained by maximum PITCH angle in PID tuning tab."
...@@ -2599,6 +2614,36 @@ ...@@ -2599,6 +2614,36 @@
"controlSmoothnessHelp": { "controlSmoothnessHelp": {
"message": "How smoothly the autopilot controls the airplane to correct the navigation error [0-9]." "message": "How smoothly the autopilot controls the airplane to correct the navigation error [0-9]."
}, },
"powerConfiguration": {
"message": "Battery Estimation Settings"
},
"idlePower": {
"message": "Idle power [cW]"
},
"idlePowerHelp": {
"message": "Power draw at zero throttle used for remaining flight time/distance estimation in 0.01W unit"
},
"cruisePower": {
"message": "Cruise power [cW]"
},
"cruisePowerHelp": {
"message": "Power draw at cruise throttle used for remaining flight time/distance estimation in 0.01W unit"
},
"cruiseSpeed": {
"message": "Cruise speed [cm/s]"
},
"cruiseSpeedHelp": {
"message": "Speed for the plane/wing at cruise throttle used for remaining flight time/distance estimation in cm/s"
},
"rthEnergyMargin": {
"message": "RTH energy margin [%]"
},
"rthEnergyMarginHelp": {
"message": "Energy margin wanted after getting home (percent of battery energy capacity). Use for the remaining flight time/distance calculation."
},
"generalNavigationSettings": {
"message": "General Navigation Settings"
},
"waypointConfiguration": { "waypointConfiguration": {
"message": "Waypoint Navigation Settings" "message": "Waypoint Navigation Settings"
}, },
...@@ -3082,6 +3127,9 @@ ...@@ -3082,6 +3127,9 @@
"osdSettingMainVoltageDecimals": { "osdSettingMainVoltageDecimals": {
"message": "Main voltage decimals" "message": "Main voltage decimals"
}, },
"osdElement_OSD_RANGEFINDER": {
"message": "Rangefinder distance"
},
"osdSettingPLUS_CODE_DIGITS_HELP": { "osdSettingPLUS_CODE_DIGITS_HELP": {
"message": "Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm." "message": "Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm."
}, },
......
...@@ -67,6 +67,12 @@ var CONFIG, ...@@ -67,6 +67,12 @@ var CONFIG,
var FC = { var FC = {
MAX_SERVO_RATE: 125, MAX_SERVO_RATE: 125,
MIN_SERVO_RATE: 0, MIN_SERVO_RATE: 0,
isAirplane: function () {
return (MIXER_CONFIG.platformType == PLATFORM_AIRPLANE);
},
isMultirotor: function () {
return (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER);
},
isRpyFfComponentUsed: function () { isRpyFfComponentUsed: function () {
return (MIXER_CONFIG.platformType == PLATFORM_AIRPLANE || MIXER_CONFIG.platformType == PLATFORM_ROVER || MIXER_CONFIG.platformType == PLATFORM_BOAT) || ((MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) && semver.gte(CONFIG.flightControllerVersion, "2.6.0")); return (MIXER_CONFIG.platformType == PLATFORM_AIRPLANE || MIXER_CONFIG.platformType == PLATFORM_ROVER || MIXER_CONFIG.platformType == PLATFORM_BOAT) || ((MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) && semver.gte(CONFIG.flightControllerVersion, "2.6.0"));
}, },
...@@ -74,7 +80,7 @@ var FC = { ...@@ -74,7 +80,7 @@ var FC = {
return true; // Currently all platforms use D term return true; // Currently all platforms use D term
}, },
isCdComponentUsed: function () { isCdComponentUsed: function () {
return MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER; return (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER);
}, },
resetState: function () { resetState: function () {
SENSOR_STATUS = { SENSOR_STATUS = {
......
...@@ -64,7 +64,7 @@ TABS.adjustments.initialize = function (callback) { ...@@ -64,7 +64,7 @@ TABS.adjustments.initialize = function (callback) {
// update list of selected functions // update list of selected functions
var functionListOptions = $(functionList).find('option'); var functionListOptions = $(functionList).find('option');
var availableFunctionCount = 53; var availableFunctionCount = 57; // Set this to highest adjustment value + 1
var functionListOptions = $(functionListOptions).slice(0,availableFunctionCount); var functionListOptions = $(functionListOptions).slice(0,availableFunctionCount);
functionList.empty().append(functionListOptions); functionList.empty().append(functionListOptions);
......
This diff is collapsed.
...@@ -4,109 +4,39 @@ TABS.advanced_tuning = {}; ...@@ -4,109 +4,39 @@ TABS.advanced_tuning = {};
TABS.advanced_tuning.initialize = function (callback) { TABS.advanced_tuning.initialize = function (callback) {
var loadChainer = new MSPChainerClass(),
saveChainer = new MSPChainerClass();
if (GUI.active_tab != 'advanced_tuning') { if (GUI.active_tab != 'advanced_tuning') {
GUI.active_tab = 'advanced_tuning'; GUI.active_tab = 'advanced_tuning';
googleAnalytics.sendAppView('AdvancedTuning'); googleAnalytics.sendAppView('AdvancedTuning');
} }
loadChainer.setChain([ loadHtml();
mspHelper.loadNavPosholdConfig,
mspHelper.loadPositionEstimationConfig,
mspHelper.loadRthAndLandConfig,
mspHelper.loadFwConfig,
mspHelper.loadBrakingConfig
]);
loadChainer.setExitPoint(loadHtml);
loadChainer.execute();
saveChainer.setChain([
mspHelper.saveNavPosholdConfig,
mspHelper.savePositionEstimationConfig,
mspHelper.saveRthAndLandConfig,
mspHelper.saveFwConfig,
mspHelper.saveBrakingConfig,
mspHelper.saveToEeprom
]);
saveChainer.setExitPoint(reboot);
function loadHtml() { function loadHtml() {
GUI.load("./tabs/advanced_tuning.html", Settings.processHtml(function () { GUI.load("./tabs/advanced_tuning.html", Settings.processHtml(function () {
var $userControlMode = $('#user-control-mode'), if (FC.isAirplane()) {
$useMidThrottle = $("#use-mid-throttle"), $('.airplaneTuning').show();
$rthClimbFirst = $('#rth-climb-first'), $('.airplaneTuningTitle').show();
$rthClimbIgnoreEmergency = $('#rthClimbIgnoreEmergency'), $('.multirotorTuning').hide();
$rthTailFirst = $('#rthTailFirst'), $('.multirotorTuningTitle').hide();
$rthAllowLanding = $('#rthAllowLanding'), $('.notFixedWingTuning').hide();
$rthAltControlMode = $('#rthAltControlMode'); } else if (FC.isMultirotor()) {
$('.airplaneTuning').hide();
$rthClimbFirst.prop("checked", RTH_AND_LAND_CONFIG.rthClimbFirst); $('.airplaneTuningTitle').hide();
$rthClimbFirst.change(function () { $('.multirotorTuning').show();
if ($(this).is(":checked")) { $('.multirotorTuningTitle').show();
RTH_AND_LAND_CONFIG.rthClimbFirst = 1; $('.notFixedWingTuning').show();
} else { } else {
RTH_AND_LAND_CONFIG.rthClimbFirst = 0; $('.airplaneTuning').show();
} $('.airplaneTuningTitle').hide();
}); $('.multirotorTuning').show();
$rthClimbFirst.change(); $('.multirotorTuningTitle').hide();
$('.notFixedWingTuning').show();
$rthClimbIgnoreEmergency.prop("checked", RTH_AND_LAND_CONFIG.rthClimbIgnoreEmergency); }
$rthClimbIgnoreEmergency.change(function () {
if ($(this).is(":checked")) {
RTH_AND_LAND_CONFIG.rthClimbIgnoreEmergency = 1;
} else {
RTH_AND_LAND_CONFIG.rthClimbIgnoreEmergency = 0;
}
});
$rthClimbIgnoreEmergency.change();
$rthTailFirst.prop("checked", RTH_AND_LAND_CONFIG.rthTailFirst);
$rthTailFirst.change(function () {
if ($(this).is(":checked")) {
RTH_AND_LAND_CONFIG.rthTailFirst = 1;
} else {
RTH_AND_LAND_CONFIG.rthTailFirst = 0;
}
});
$rthTailFirst.change();
GUI.fillSelect($rthAltControlMode, FC.getRthAltControlMode(), RTH_AND_LAND_CONFIG.rthAltControlMode);
$rthAltControlMode.val(RTH_AND_LAND_CONFIG.rthAltControlMode);
$rthAltControlMode.change(function () {
RTH_AND_LAND_CONFIG.rthAltControlMode = $rthAltControlMode.val();
});
GUI.fillSelect($rthAllowLanding, FC.getRthAllowLanding(), RTH_AND_LAND_CONFIG.rthAllowLanding);
$rthAllowLanding.val(RTH_AND_LAND_CONFIG.rthAllowLanding);
$rthAllowLanding.change(function () {
RTH_AND_LAND_CONFIG.rthAllowLanding = $rthAllowLanding.val();
});
GUI.fillSelect($userControlMode, FC.getUserControlMode(), NAV_POSHOLD.userControlMode);
$userControlMode.val(NAV_POSHOLD.userControlMode);
$userControlMode.change(function () {
NAV_POSHOLD.userControlMode = $userControlMode.val();
});
$useMidThrottle.prop("checked", NAV_POSHOLD.useThrottleMidForAlthold);
$useMidThrottle.change(function () {
if ($(this).is(":checked")) {
NAV_POSHOLD.useThrottleMidForAlthold = 1;
} else {
NAV_POSHOLD.useThrottleMidForAlthold = 0;
}
});
$useMidThrottle.change();
GUI.simpleBind(); GUI.simpleBind();
localize(); localize();
$('#advanced-tuning-save-button').click(function () {
saveChainer.execute();
});
$('a.save').click(function () { $('a.save').click(function () {
Settings.saveInputs().then(function () { Settings.saveInputs().then(function () {
...@@ -117,6 +47,7 @@ TABS.advanced_tuning.initialize = function (callback) { ...@@ -117,6 +47,7 @@ TABS.advanced_tuning.initialize = function (callback) {
setTimeout(function () { setTimeout(function () {
$(self).html(oldText); $(self).html(oldText);
}, 2000); }, 2000);
reboot();
}); });
}); });
GUI.content_ready(callback); GUI.content_ready(callback);
......
...@@ -35,17 +35,17 @@ TABS.auxiliary.initialize = function (callback) { ...@@ -35,17 +35,17 @@ TABS.auxiliary.initialize = function (callback) {
function sort_modes_for_display() { function sort_modes_for_display() {
// This array defines the order that the modes are displayed in the configurator modes page // This array defines the order that the modes are displayed in the configurator modes page
configuratorBoxOrder = [ configuratorBoxOrder = [
"ARM", // Arming "ARM", // Arming
"ANGLE", "HORIZON", "MANUAL", // Flight modes "ANGLE", "HORIZON", "MANUAL", // Flight modes
"NAV RTH", "NAV POSHOLD", "NAV CRUISE", // Navigation mode "NAV RTH", "NAV POSHOLD", "NAV CRUISE", // Navigation mode
"NAV ALTHOLD", "HEADING HOLD", "AIR MODE", // Flight mode modifiers "NAV ALTHOLD", "HEADING HOLD", "AIR MODE", // Flight mode modifiers
"NAV WP", "GCS NAV", "HOME RESET", // Navigation "NAV WP", "GCS NAV", "HOME RESET", // Navigation
"SERVO AUTOTRIM", "AUTO TUNE", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", // Fixed wing specific "SERVO AUTOTRIM", "AUTO TUNE", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", // Fixed wing specific
"FPV ANGLE MIX", "TURN ASSIST", "MC BRAKING", "SURFACE", "HEADFREE", "HEADADJ", // Multi-rotor specific "TURTLE", "FPV ANGLE MIX", "TURN ASSIST", "MC BRAKING", "SURFACE", "HEADFREE", "HEADADJ", // Multi-rotor specific
"BEEPER", "LEDLOW", "LIGHTS", // Feedback "BEEPER", "LEDS OFF", "LIGHTS", // Feedback
"OSD SW", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3", // OSD "OSD OFF", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3", // OSD
"CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3", // FPV Camera "CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3", // FPV Camera
"BLACKBOX", "FAILSAFE", "KILLSWITCH", "TELEMETRY", "MSP RC OVERRIDE", "USER1", "USER2" // Misc "BLACKBOX", "FAILSAFE", "KILLSWITCH", "TELEMETRY", "MSP RC OVERRIDE", "USER1", "USER2" // Misc
]; ];
// Sort the modes // Sort the modes
......
...@@ -963,6 +963,11 @@ OSD.constants = { ...@@ -963,6 +963,11 @@ OSD.constants = {
} }
return FONT.embed_dot('-0.5') + FONT.symbol(SYM.M_S); return FONT.embed_dot('-0.5') + FONT.symbol(SYM.M_S);
} }
},
{
name: 'OSD_RANGEFINDER',
id: 120,
preview: "2" + FONT.symbol(SYM.DIST_KM)
} }
] ]
}, },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment