diff options
author | Paweł Spychalski <pspychalski@gmail.com> | 2020-10-29 14:35:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 14:35:20 +0300 |
commit | 08458d3a64a9494f36ea5cbafe8417da2fd73ca3 (patch) | |
tree | f81462d98c126df51b7395c12fe700ecbe052801 | |
parent | 8bf37f03e3435aed1baa5bdaea9f8efdfeeda7aa (diff) | |
parent | cc995c18fa680281111d0786d13386a54088366d (diff) |
Merge pull request #1020 from pablitous/master
Added launch settings in Advanced Tuning tab + nav_fw_control_smoothness
-rwxr-xr-x | _locales/en/messages.json | 84 | ||||
-rw-r--r-- | tabs/advanced_tuning.html | 100 | ||||
-rw-r--r-- | tabs/advanced_tuning.js | 52 | ||||
-rw-r--r-- | tabs/configuration.html | 6 |
4 files changed, 221 insertions, 21 deletions
diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 979d3a01..5d203345 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -758,6 +758,81 @@ "configurationBatteryCapacityUnit": { "message": "Battery Capacity Unit" }, + "configurationLaunch": { + "message": "Fixed Wing Auto Launch Settings" + }, + "configurationLaunchVelocity": { + "message": "Threshold Velocity" + }, + "configurationLaunchAccel": { + "message": "Threshold Acceleration" + }, + "configurationLaunchMaxAngle": { + "message": "Max Tilt Angle" + }, + "configurationLaunchDetectTime": { + "message": "Detect Time" + }, + "configurationLaunchThr": { + "message": "Throttle" + }, + "configurationLaunchIdleThr": { + "message": "Idle Throttle" + }, + "configurationLaunchMotorDelay": { + "message": "Motor Delay" + }, + "configurationLaunchSpinupTime": { + "message": "Motor Spinup Time" + }, + "configurationLaunchMinTime": { + "message": "Min Time" + }, + "configurationLaunchTimeout": { + "message": "Time Out" + }, + "configurationLaunchMaxAltitude": { + "message": "Max Altitude" + }, + "configurationLaunchClimbAngle": { + "message": "Climb Angle" + }, + "configurationLaunchVelocityHelp": { + "message": "Forward velocity threshold for swing-launch detection [cm/s]" + }, + "configurationLaunchAccelHelp": { + "message": "Forward acceleration threshold for bungee launch of throw launch [cm/s/s], 1G = 981 cm/s/s" + }, + "configurationLaunchMaxAngleHelp": { + "message": "Max tilt angle (pitch/roll combined) to consider launch successful. Set to 180 to disable completely [deg]" + }, + "configurationLaunchDetectTimeHelp": { + "message": "Time for which thresholds have to breached to consider launch happened [ms]" + }, + "configurationLaunchThrHelp": { + "message": "Launch throttle - throttle to be set during launch sequence (pwm units)" + }, + "configurationLaunchIdleThrHelp": { + "message": "Launch idle throttle - throttle to be set before launch sequence is initiated. If set below minimum throttle it will force motor stop or at idle throttle (depending if the MOTOR_STOP is enabled). If set above minimum throttle it will force throttle to this value (if MOTOR_STOP is enabled it will be handled according to throttle stick position)" + }, + "configurationLaunchMotorDelayHelp": { + "message": "Delay between detected launch and launch sequence start and throttling up (ms)" + }, + "configurationLaunchSpinupTimeHelp": { + "message": "Time to bring power from minimum throttle to nav_fw_launch_thr - to avoid big stress on ESC and large torque from propeller" + }, + "configurationLaunchMinTimeHelp": { + "message": "Allow launch mode to execute at least this time (ms) and ignore stick movements [0-60000]." + }, + "configurationLaunchTimeoutHelp": { + "message": "Maximum time for launch sequence to be executed. After this time LAUNCH mode will be turned off and regular flight mode will take over (ms)" + }, + "configurationLaunchMaxAltitudeHelp": { + "message": "Altitude at which LAUNCH mode will be turned off and regular flight mode will take over. [cm]" + }, + "configurationLaunchClimbAngleHelp": { + "message": "Climb angle for launch sequence (degrees), is also restrained by global max_angle_inclination_pit" + }, "configuration3d": { "message": "Reversible motors" }, @@ -788,6 +863,9 @@ "configurationGPSProtocol": { "message": "Protocol" }, + "configurationGPSUseGalileo": { + "message": "Gps use Galileo Satellites" + }, "configurationGPSBaudrate": { "message": "Baudrate" }, @@ -2434,6 +2512,12 @@ "loiterRadius": { "message": "Loiter radius [cm]" }, + "controlSmoothness": { + "message": "Control Smoothness" + }, + "controlSmoothnessHelp": { + "message": "How smoothly the autopilot controls the airplane to correct the navigation error [0-9]" + }, "fixedWingNavigationConfiguration": { "message": "Fixed Wing Navigation Settings" }, diff --git a/tabs/advanced_tuning.html b/tabs/advanced_tuning.html index fb52530f..be5aacb2 100644 --- a/tabs/advanced_tuning.html +++ b/tabs/advanced_tuning.html @@ -150,6 +150,98 @@ </div> </div> </div> + <div class="config-section gui_box grey"> + <div class="gui_box_titlebar"> + <div class="spacer_box_title" data-i18n="configurationLaunch"></div> + </div> + <div class="spacer_box settings"> + <div class="number"> + <input type="number" id="launchVelocity" data-setting="nav_fw_launch_velocity" data-setting-multiplier="1" step="1" min="1000" max="2000" /> + <label for="launchVelocity"> + <span data-i18n="configurationLaunchVelocity"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchVelocityHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchAccel" data-setting="nav_fw_launch_accel" data-setting-multiplier="1" step="1" min="1000" max="2000" /> + <label for="launchAccel"> + <span data-i18n="configurationLaunchAccel"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchAccelHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchMaxAngle" data-setting="nav_fw_launch_max_angle" data-setting-multiplier="1" step="1" min="5" max="180" /> + <label for="launchMaxAngle"> + <span data-i18n="configurationLaunchMaxAngle"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchMaxAngleHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchDetectTime" data-setting="nav_fw_launch_detect_time" data-setting-multiplier="1" step="1" min="10" max="1000" /> + <label for="launchDetectTime"> + <span data-i18n="configurationLaunchDetectTime"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchDetectTimeHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchThr" data-setting="nav_fw_launch_thr" data-setting-multiplier="1" step="1" min="1000" max="2000" /> + <label for="launchThr"> + <span data-i18n="configurationLaunchThr"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchThrHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchIdleThr" data-setting="nav_fw_launch_idle_thr" data-setting-multiplier="1" step="1" min="1000" max="2000" /> + <label for="launchIdleThr"> + <span data-i18n="configurationLaunchIdleThr"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchIdleThrHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchMotorDelay" data-setting="nav_fw_launch_motor_delay" data-setting-multiplier="1" step="1" min="0" max="5000" /> + <label for="launchMotorDelay"> + <span data-i18n="configurationLaunchMotorDelay"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchMotorDelayHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchSpinupTime" data-setting="nav_fw_launch_spinup_time" data-setting-multiplier="1" step="1" min="0" max="1000" /> + <label for="launchSpinupTime"> + <span data-i18n="configurationLaunchSpinupTime"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchSpinupTimeHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchMinTime" data-setting="nav_fw_launch_min_time" data-setting-multiplier="1" step="1" min="0" max="60000" /> + <label for="launchMinTime"> + <span data-i18n="configurationLaunchMinTime"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchMinTimeHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchTimeout" data-setting="nav_fw_launch_timeout" data-setting-multiplier="1" step="1" min="0" max="60000" /> + <label for="launchTimeout"> + <span data-i18n="configurationLaunchTimeout"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchTimeoutHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchMaxAltitude" data-setting="nav_fw_launch_max_altitude" data-setting-multiplier="1" step="1" min="0" max="60000" /> + <label for="launchMaxAltitude"> + <span data-i18n="configurationLaunchMaxAltitude"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchMaxAltitudeHelp"></div> + </div> + <div class="number"> + <input type="number" id="launchClimbAngle" data-setting="nav_fw_launch_climb_angle" data-setting-multiplier="1" step="1" min="0" max="60000" /> + <label for="launchClimbAngle"> + <span data-i18n="configurationLaunchClimbAngle"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="configurationLaunchClimbAngleHelp"></div> + </div> + </div> + + </div> </div> @@ -272,7 +364,13 @@ <span data-i18n="loiterRadius"></span> </label> </div> - + <div class="number"> + <input type="number" id="controlSmoothness" data-setting="nav_fw_control_smoothness" data-setting-multiplier="1" step="1" min="0" max="9" /> + <label for="controlSmoothness"> + <span data-i18n="controlSmoothness"></span> + </label> + <div class="helpicon cf_tip" data-i18n_title="controlSmoothnessHelp"></div> + </div> </div> </div> diff --git a/tabs/advanced_tuning.js b/tabs/advanced_tuning.js index 79ac3700..fb37d702 100644 --- a/tabs/advanced_tuning.js +++ b/tabs/advanced_tuning.js @@ -33,26 +33,9 @@ TABS.advanced_tuning.initialize = function (callback) { saveChainer.setExitPoint(reboot); function loadHtml() { - GUI.load("./tabs/advanced_tuning.html", processHtml); - } - - function reboot() { - //noinspection JSUnresolvedVariable - GUI.log(chrome.i18n.getMessage('configurationEepromSaved')); - GUI.tab_switch_cleanup(function () { - MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, reinitialize); - }); - } + GUI.load("./tabs/advanced_tuning.html", Settings.processHtml(function () { - function reinitialize() { - //noinspection JSUnresolvedVariable - GUI.log(chrome.i18n.getMessage('deviceRebooting')); - GUI.handleReconnect($('.tab_advanced_tuning a')); - } - - function processHtml() { - - var $userControlMode = $('#user-control-mode'), + var $userControlMode = $('#user-control-mode'), $useMidThrottle = $("#use-mid-throttle"), $rthClimbFirst = $('#rth-climb-first'), $rthClimbIgnoreEmergency = $('#rthClimbIgnoreEmergency'), @@ -124,9 +107,38 @@ TABS.advanced_tuning.initialize = function (callback) { $('#advanced-tuning-save-button').click(function () { saveChainer.execute(); }); - + + $('a.save').click(function () { + Settings.saveInputs().then(function () { + var self = this; + MSP.promise(MSPCodes.MSP_EEPROM_WRITE); + var oldText = $(this).text(); + $(this).html("Saved"); + setTimeout(function () { + $(self).html(oldText); + }, 2000); + }); + }); GUI.content_ready(callback); + + })); + } + + function reboot() { + //noinspection JSUnresolvedVariable + GUI.log(chrome.i18n.getMessage('configurationEepromSaved')); + GUI.tab_switch_cleanup(function () { + MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, reinitialize); + }); } + + function reinitialize() { + //noinspection JSUnresolvedVariable + GUI.log(chrome.i18n.getMessage('deviceRebooting')); + GUI.handleReconnect($('.tab_advanced_tuning a')); + } + + }; TABS.advanced_tuning.cleanup = function (callback) { diff --git a/tabs/configuration.html b/tabs/configuration.html index 1e99a4f6..0c00ff76 100644 --- a/tabs/configuration.html +++ b/tabs/configuration.html @@ -143,6 +143,12 @@ <span data-i18n="configurationMagDeclination"></span> </label> </div> + <div class="checkbox"> + <input type="checkbox" class="toggle update_preview" data-setting="gps_ublox_use_galileo" data-live="true"> + <label for="gps_use_galileo"> + <span data-i18n="configurationGPSUseGalileo"></span> + </label> + </div> </div> </div> |