1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-26 17:55:21 +03:00

Merge pull request #1532 from iNavFlight/release_5.0.0

Release 5.0.0
This commit is contained in:
Paweł Spychalski 2022-06-26 11:40:53 +02:00 committed by GitHub
commit ec312b6e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 24 additions and 62 deletions

View file

@ -242,6 +242,7 @@ var Settings = (function () {
'cmss' : 'cm/s/s', 'cmss' : 'cm/s/s',
// Time // Time
'msec' : 'ms', 'msec' : 'ms',
'msec-nc' : 'ms', // Milliseconds, but not converted.
'dsec' : 'ds', 'dsec' : 'ds',
'sec' : 's', 'sec' : 's',
// Angles // Angles
@ -309,6 +310,9 @@ var Settings = (function () {
'hftmin' : 50.8, 'hftmin' : 50.8,
'fts' : 30.48 'fts' : 30.48
}, },
'msec-nc' : {
'msec-nc' : 1
},
'msec' : { 'msec' : {
'sec' : 1000 'sec' : 1000
}, },

View file

@ -125,6 +125,7 @@
.tab-onboard_logging dialog { .tab-onboard_logging dialog {
width: 40em; width: 40em;
border-radius: 5px; border-radius: 5px;
height: fit-content;
} }
.tab-onboard_logging dialog .buttons { .tab-onboard_logging dialog .buttons {

View file

@ -17,7 +17,7 @@
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchIdleDelay" data-unit="ms" data-setting="nav_fw_launch_idle_motor_delay" data-setting-multiplier="1" step="1" min="0" max="60000" /> <input type="number" id="launchIdleDelay" data-unit="msec" data-setting="nav_fw_launch_idle_motor_delay" data-setting-multiplier="1" step="1" min="0" max="60000" />
<label for="launchIdleDelay"><span data-i18n="configurationLaunchIdleDelay"></span></label> <label for="launchIdleDelay"><span data-i18n="configurationLaunchIdleDelay"></span></label>
<div for="launchIdleDelay" class="helpicon cf_tip" data-i18n_title="configurationLaunchIdleDelayHelp"></div> <div for="launchIdleDelay" class="helpicon cf_tip" data-i18n_title="configurationLaunchIdleDelayHelp"></div>
</div> </div>
@ -38,22 +38,22 @@
<div for="launchAccel" class="helpicon cf_tip" data-i18n_title="configurationLaunchAccelHelp"></div> <div for="launchAccel" class="helpicon cf_tip" data-i18n_title="configurationLaunchAccelHelp"></div>
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchDetectTime" data-unit="ms" data-setting="nav_fw_launch_detect_time" data-setting-multiplier="1" step="1" min="10" max="1000" /> <input type="number" id="launchDetectTime" data-unit="msec-nc" 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> <label for="launchDetectTime"><span data-i18n="configurationLaunchDetectTime"></span></label>
<div for="launchDetectTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchDetectTimeHelp"></div> <div for="launchDetectTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchDetectTimeHelp"></div>
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchMotorDelay" data-unit="ms" data-setting="nav_fw_launch_motor_delay" data-setting-multiplier="1" step="1" min="0" max="5000" /> <input type="number" id="launchMotorDelay" data-unit="msec-nc" 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> <label for="launchMotorDelay"><span data-i18n="configurationLaunchMotorDelay"></span></label>
<div for="launchMotorDelay" class="helpicon cf_tip" data-i18n_title="configurationLaunchMotorDelayHelp"></div> <div for="launchMotorDelay" class="helpicon cf_tip" data-i18n_title="configurationLaunchMotorDelayHelp"></div>
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchMinTime" data-unit="ms" data-setting="nav_fw_launch_min_time" data-setting-multiplier="1" step="1" min="0" max="60000" /> <input type="number" id="launchMinTime" data-unit="msec" 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> <label for="launchMinTime"><span data-i18n="configurationLaunchMinTime"></span></label>
<div for="launchMinTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchMinTimeHelp"></div> <div for="launchMinTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchMinTimeHelp"></div>
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchSpinupTime" data-unit="ms" data-setting="nav_fw_launch_spinup_time" data-setting-multiplier="1" step="1" min="0" max="1000" /> <input type="number" id="launchSpinupTime" data-unit="msec-nc" 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> <label for="launchSpinupTime"><span data-i18n="configurationLaunchSpinupTime"></span></label>
<div for="launchSpinupTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchSpinupTimeHelp"></div> <div for="launchSpinupTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchSpinupTimeHelp"></div>
</div> </div>
@ -68,7 +68,7 @@
<div for="launchClimbAngle" class="helpicon cf_tip" data-i18n_title="configurationLaunchClimbAngleHelp"></div> <div for="launchClimbAngle" class="helpicon cf_tip" data-i18n_title="configurationLaunchClimbAngleHelp"></div>
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchTimeout" data-unit="ms" data-setting="nav_fw_launch_timeout" data-setting-multiplier="1" step="1" min="0" max="60000" /> <input type="number" id="launchTimeout" data-unit="msec" 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> <label for="launchTimeout"><span data-i18n="configurationLaunchTimeout"></span></label>
<div for="launchTimeout" class="helpicon cf_tip" data-i18n_title="configurationLaunchTimeoutHelp"></div> <div for="launchTimeout" class="helpicon cf_tip" data-i18n_title="configurationLaunchTimeoutHelp"></div>
</div> </div>
@ -78,7 +78,7 @@
<div for="launchMaxAltitude" class="helpicon cf_tip" data-i18n_title="configurationLaunchMaxAltitudeHelp"></div> <div for="launchMaxAltitude" class="helpicon cf_tip" data-i18n_title="configurationLaunchMaxAltitudeHelp"></div>
</div> </div>
<div class="number"> <div class="number">
<input type="number" id="launchEndTime" data-unit="ms" data-setting="nav_fw_launch_end_time" data-setting-multiplier="1" step="1" min="0" max="5000" /> <input type="number" id="launchEndTime" data-unit="msec" data-setting="nav_fw_launch_end_time" data-setting-multiplier="1" step="1" min="0" max="5000" />
<label for="launchEndTime"><span data-i18n="configurationLaunchEndTime"></span></label> <label for="launchEndTime"><span data-i18n="configurationLaunchEndTime"></span></label>
<div for="launchEndTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchEndTimeHelp"></div> <div for="launchEndTime" class="helpicon cf_tip" data-i18n_title="configurationLaunchEndTimeHelp"></div>
</div> </div>
@ -278,7 +278,7 @@
</div> </div>
<div class="number"> <div class="number">
<input id="brakingTimeout" type="number" data-unit="ms" data-setting="nav_mc_braking_timeout" data-setting-multiplier="1" step="1" min="100" max="5000" /> <input id="brakingTimeout" type="number" data-unit="msec" data-setting="nav_mc_braking_timeout" data-setting-multiplier="1" step="1" min="100" max="5000" />
<label for="brakingTimeout"><span data-i18n="brakingTimeout"></span></label> <label for="brakingTimeout"><span data-i18n="brakingTimeout"></span></label>
<div for="brakingTimeout" class="helpicon cf_tip" data-i18n_title="brakingTimeoutTip"></div> <div for="brakingTimeout" class="helpicon cf_tip" data-i18n_title="brakingTimeoutTip"></div>
</div> </div>
@ -290,7 +290,7 @@
</div> </div>
<div class="number"> <div class="number">
<input id="brakingBoostTimeout" type="number" data-unit="ms" data-setting="nav_mc_braking_boost_timeout" data-setting-multiplier="1" step="1" min="0" max="5000" /> <input id="brakingBoostTimeout" type="number" data-unit="msec" data-setting="nav_mc_braking_boost_timeout" data-setting-multiplier="1" step="1" min="0" max="5000" />
<label for="brakingBoostTimeout"><span data-i18n="brakingBoostTimeout"></span></label> <label for="brakingBoostTimeout"><span data-i18n="brakingBoostTimeout"></span></label>
<div for="brakingBoostTimeout" class="helpicon cf_tip" data-i18n_title="brakingBoostTimeoutTip"></div> <div for="brakingBoostTimeout" class="helpicon cf_tip" data-i18n_title="brakingBoostTimeoutTip"></div>
</div> </div>

View file

@ -226,8 +226,8 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
// fill battery capacity // fill battery capacity
$('#battery_capacity').val(MISC.battery_capacity); $('#battery_capacity').val(MISC.battery_capacity);
$('#battery_capacity_warning').val(MISC.battery_capacity_warning * 100 / MISC.battery_capacity); $('#battery_capacity_warning').val(Math.round(MISC.battery_capacity_warning * 100 / MISC.battery_capacity));
$('#battery_capacity_critical').val(MISC.battery_capacity_critical * 100 / MISC.battery_capacity); $('#battery_capacity_critical').val(Math.round(MISC.battery_capacity_critical * 100 / MISC.battery_capacity));
$('#battery_capacity_unit').val(MISC.battery_capacity_unit); $('#battery_capacity_unit').val(MISC.battery_capacity_unit);
let $i2cSpeed = $('#i2c_speed'), let $i2cSpeed = $('#i2c_speed'),

View file

@ -2787,6 +2787,7 @@ OSD.GUI.updateAll = function() {
layouts.on('change', function() { layouts.on('change', function() {
OSD.updateSelectedLayout(parseInt(layouts.val())); OSD.updateSelectedLayout(parseInt(layouts.val()));
OSD.GUI.updateFields(); OSD.GUI.updateFields();
OSD.GUI.updateDjiView($('#djiUnsupportedElements').find('input').is(':checked'));
OSD.GUI.updatePreviews(); OSD.GUI.updatePreviews();
}); });
} else { } else {

View file

@ -16,7 +16,6 @@
</div> </div>
<!--list of generated features goes here--> <!--list of generated features goes here-->
<div id="esc-protocols"> <div id="esc-protocols">
<div id="esc-protocol-warning" class="warning-box"></div>
<div class="select"> <div class="select">
<select name="esc-protocol" id="esc-protocol" data-setting-placeholder="motor_pwm_protocol"></select> <select name="esc-protocol" id="esc-protocol" data-setting-placeholder="motor_pwm_protocol"></select>
<label for="esc-protocol"> <label for="esc-protocol">
@ -24,13 +23,6 @@
</label> </label>
<div for="esc-protocol" class="helpicon cf_tip" data-i18n_title="escProtocolHelp"></div> <div for="esc-protocol" class="helpicon cf_tip" data-i18n_title="escProtocolHelp"></div>
</div> </div>
<div class="select hide-for-shot">
<select name="esc-rate" id="esc-rate" data-setting-placeholder="motor_pwm_rate"></select>
<label for="esc-rate">
<span data-i18n="escRefreshRate"></span>
</label>
<div for="esc-rate" class="helpicon cf_tip" data-i18n_title="escRefreshRatelHelp"></div>
</div>
<div class="clear-both"></div> <div class="clear-both"></div>
</div> </div>

View file

@ -99,24 +99,7 @@ TABS.outputs.initialize = function (callback) {
$motorStopWarningBox = $("#motor-stop-warning"), $motorStopWarningBox = $("#motor-stop-warning"),
$reversibleMotorBox = $(".for-reversible-motors"); $reversibleMotorBox = $(".for-reversible-motors");
function buildMotorRates() { function handleIdleMessageBox() {
var protocolData = escProtocols[ADVANCED_CONFIG.motorPwmProtocol];
$escRate.find('option').remove();
for (var i in protocolData.rates) {
if (protocolData.rates.hasOwnProperty(i)) {
$escRate.append('<option value="' + i + '">' + protocolData.rates[i] + '</option>');
}
}
/*
* If rate from FC is not on the list, add a new entry
*/
if ($escRate.find('[value="' + ADVANCED_CONFIG.motorPwmRate + '"]').length == 0) {
$escRate.append('<option value="' + ADVANCED_CONFIG.motorPwmRate + '">' + ADVANCED_CONFIG.motorPwmRate + 'Hz</option>');
}
$idleInfoBox.hide(); $idleInfoBox.hide();
if (ADVANCED_CONFIG.motorPwmProtocol >= 5) { if (ADVANCED_CONFIG.motorPwmProtocol >= 5) {
$('.hide-for-shot').hide(); $('.hide-for-shot').hide();
@ -133,18 +116,10 @@ TABS.outputs.initialize = function (callback) {
$idleInfoBox.show(); $idleInfoBox.show();
} }
} }
if (protocolData.message !== null) {
$('#esc-protocol-warning').html(chrome.i18n.getMessage(protocolData.message));
$('#esc-protocol-warning').show();
} else {
$('#esc-protocol-warning').hide();
}
} }
let $escProtocol = $('#esc-protocol'); let $escProtocol = $('#esc-protocol');
let $escRate = $('#esc-rate');
for (i in escProtocols) { for (i in escProtocols) {
if (escProtocols.hasOwnProperty(i)) { if (escProtocols.hasOwnProperty(i)) {
var protocolData = escProtocols[i]; var protocolData = escProtocols[i];
@ -153,21 +128,13 @@ TABS.outputs.initialize = function (callback) {
} }
$escProtocol.val(ADVANCED_CONFIG.motorPwmProtocol); $escProtocol.val(ADVANCED_CONFIG.motorPwmProtocol);
buildMotorRates();
$escRate.val(ADVANCED_CONFIG.motorPwmRate);
$escProtocol.change(function () { $escProtocol.change(function () {
ADVANCED_CONFIG.motorPwmProtocol = $(this).val(); ADVANCED_CONFIG.motorPwmProtocol = $(this).val();
buildMotorRates();
ADVANCED_CONFIG.motorPwmRate = escProtocols[ADVANCED_CONFIG.motorPwmProtocol].defaultRate;
$escRate.val(ADVANCED_CONFIG.motorPwmRate);
}); });
$escRate.change(function () { $idlePercent.change(handleIdleMessageBox);
ADVANCED_CONFIG.motorPwmRate = $(this).val(); handleIdleMessageBox();
});
$idlePercent.change(buildMotorRates);
$("#esc-protocols").show(); $("#esc-protocols").show();

View file

@ -538,7 +538,7 @@
<tr> <tr>
<th data-i18n="pidTuning_FW_TPATimeConstant"></th> <th data-i18n="pidTuning_FW_TPATimeConstant"></th>
<td> <td>
<div class="pidTuning_number"><input id="tpaTimeConstant" type="number" class="rate-tpa_input" data-setting="fw_tpa_time_constant" data-unit="ms" /></div> <div class="pidTuning_number"><input id="tpaTimeConstant" type="number" class="rate-tpa_input" data-setting="fw_tpa_time_constant" data-unit="msec" /></div>
<div for="tpaTimeConstant" class="helpicon cf_tip" data-i18n_title="pidTuning_FW_TPATimeConstantHelp"></div> <div for="tpaTimeConstant" class="helpicon cf_tip" data-i18n_title="pidTuning_FW_TPATimeConstantHelp"></div>
</td> </td>
</tr> </tr>

View file

@ -178,11 +178,6 @@ TABS.receiver.initialize = function (callback) {
// set current value // set current value
$rcMap.val(str); $rcMap.val(str);
/*
* Send tracking event so we can know if users are using different mappings than EATR
*/
googleAnalytics.sendEvent('Setting', 'RcMappingRead', str);
// validation / filter // validation / filter
var last_valid = str; var last_valid = str;
@ -297,6 +292,8 @@ TABS.receiver.initialize = function (callback) {
RC_MAP[i] = strBuffer.indexOf(FC.getRcMapLetters()[i]); RC_MAP[i] = strBuffer.indexOf(FC.getRcMapLetters()[i]);
} }
googleAnalytics.sendEvent('Setting', 'RcProtocol', $('#receiver_type option:selected').text() + ":" + $('#serialrx_provider option:selected').text());
// catch rssi aux // catch rssi aux
MISC.rssi_channel = parseInt($('select[name="rssi_channel"]').val()); MISC.rssi_channel = parseInt($('select[name="rssi_channel"]').val());