Skip to content

Commit

Permalink
Merge pull request #2282 from iNavFlight/MrD_Add-wiggle-wake-to-Adv-T…
Browse files Browse the repository at this point in the history
…uning

Add wiggle to wake idle to Adv Tuning
  • Loading branch information
MrD-RC authored Dec 14, 2024
2 parents f454d6e + dcee8c5 commit 48d6389
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions locale/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,12 @@
"configurationLaunchIdleDelayHelp": {
"message": "Set a time delay between raising the throttle for the launch, and the motor starting at idle throttle. Default: 0 [0-60000]"
},
"configurationWiggleWakeIdle": {
"message": "Wiggle to Wake Idle"
},
"configurationWiggleWakeIdleHelp": {
"message": "If enabled, this feature allows a yaw wiggle of the aircraft to wake up the motors from idle.<br />0: Disabled (default)<br />1: 1 wiggle - This setting has a higher detection point, for airplanes without a tail that can be moved easily<br />2: 2 wiggles - This setting has a lower detection point, but requires the repeated action. This is intended for larger models and airplanes with tails"
},
"configurationLaunchMotorDelay": {
"message": "Motor Delay"
},
Expand Down
5 changes: 5 additions & 0 deletions tabs/advanced_tuning.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<label for="launchIdleDelay"><span data-i18n="configurationLaunchIdleDelay"></span></label>
<div for="launchIdleDelay" class="helpicon cf_tip" data-i18n_title="configurationLaunchIdleDelayHelp"></div>
</div>
<div class="select">
<select id="wiggleWakeIdle" data-setting="nav_fw_launch_wiggle_to_wake_idle"></select>
<label for="wiggleWakeIdle"><span data-i18n="configurationWiggleWakeIdle"></span></label>
<div for="wiggleWakeIdle" class="helpicon cf_tip" data-i18n_title="configurationWiggleWakeIdleHelp"></div>
</div>
<div class="number">
<input type="number" id="launchMaxAngle" data-unit="deg" 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>
Expand Down
6 changes: 5 additions & 1 deletion tabs/advanced_tuning.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ TABS.advanced_tuning.initialize = function (callback) {
TABS.advanced_tuning.checkRequirements_IdleThrottle();
});

$('#wiggleWakeIdle').on('change', function () {
TABS.advanced_tuning.checkRequirements_IdleThrottle();
});

$('#rthHomeAltitude').on('keyup', () => {
TABS.advanced_tuning.checkRequirements_LinearDescent();
});
Expand All @@ -97,7 +101,7 @@ TABS.advanced_tuning.initialize = function (callback) {

TABS.advanced_tuning.checkRequirements_IdleThrottle = function() {
let idleThrottle = $('#launchIdleThr');
if ($('#launchIdleDelay').val() > 0 && (idleThrottle.val() == "" || idleThrottle.val() < "1150")) {
if (($('#launchIdleDelay').val() > 0 || $('#wiggleWakeIdle').find(":selected").val() > 0) && (idleThrottle.val() == "" || idleThrottle.val() < "1150")) {
idleThrottle.addClass('inputRequiredWarning');
} else {
idleThrottle.removeClass('inputRequiredWarning');
Expand Down

0 comments on commit 48d6389

Please sign in to comment.