1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 22:35:17 +03:00

Merge pull request #1003 from jmguarino/issue#975

Switched dshot beacon input to address issue #975
This commit is contained in:
Michael Keller 2018-04-10 01:06:52 +12:00 committed by GitHub
commit aa0189bd33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View file

@ -239,7 +239,16 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
var dshotBeeper_e = $('.tab-configuration .dshotbeeper');
var dshotBeacon_e = $('.tab-configuration .dshotbeacon');
var dshotBeeperSwitch = $('#dshotBeeperSwitch');
var dshotBeeperBeaconTone = $('#dshotBeeperBeaconTone');
var dshotBeeperBeaconTone = $('select.dshotBeeperBeaconTone');
if (semver.gte(CONFIG.apiVersion, "1.37.0")) {
for (var i = 1; i <= 5; i++) {
dshotBeeperBeaconTone.append('<option value="' + (i) + '">'+ (i) + '</option>');
}
dshotBeeper_e.show();
} else {
dshotBeeper_e.hide();
}
dshotBeeperSwitch.change(function() {
if ($(this).is(':checked')) {
@ -260,12 +269,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
dshotBeeperBeaconTone.val(BEEPER_CONFIG.dshotBeaconTone);
dshotBeeperSwitch.prop('checked', BEEPER_CONFIG.dshotBeaconTone !== 0).change();
if (semver.gte(CONFIG.apiVersion, "1.37.0")) {
dshotBeeper_e.show();
} else {
dshotBeeper_e.hide();
}
// Analog Beeper
var template = $('.beepers .beeper-template');
var destination = $('.beepers .beeper-configuration');

View file

@ -703,9 +703,12 @@
</tr>
<tr class="dshotbeacon">
<td>
<div class="number">
<div class="select">
<div style="float: left; height: 20px; margin-right: 10px;">
<input type="number" id="dshotBeeperBeaconTone" step="1" min="1" max="5" />
<select class="dshotBeeperBeaconTone">
<option value="0" hidden></option>
<!-- list generated here -->
</select>
</div>
<label for="dshotBeeperBeaconTone">
<span i18n="configurationDshotBeaconTone"></span>