Merge pull request #1519 from iNavFlight/dzikuvx-move-3d-config-to-outputs

Move the 3D config to Outputs tab
pull/1521/head
Paweł Spychalski 2 years ago committed by GitHub
commit 274196e257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,67 +77,14 @@
</div>
</div>
<div class="config-section gui_box grey">
<div class="config-section gui_box grey other">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="configuration3d"></div>
</div>
<div class="spacer_box">
<div class="number">
<input type="number" id="3ddeadbandlow" name="3ddeadbandlow" step="1" min="1425" max="1500" />
<label for="3ddeadbandlow">
<span data-i18n="configuration3dDeadbandLow"></span>
</label>
</div>
<div class="number">
<input type="number" id="3ddeadbandhigh" name="3ddeadbandhigh" step="1" min="1500" max="1575" />
<label for="3ddeadbandhigh">
<span data-i18n="configuration3dDeadbandHigh"></span>
</label>
</div>
<div class="number">
<input type="number" id="3dneutral" name="3dneutral" step="1" min="1475" max="1525" />
<label for="3dneutral">
<span data-i18n="configuration3dNeutral"></span>
</label>
</div>
<div class="spacer_box_title" data-i18n="configurationFeatures"></div>
</div>
</div>
<div class="config-section gui_box grey config-vtx">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="configurationVTX"></div>
</div>
<div class="spacer_box">
<div class="info-box" data-i18n="vtxDisclaimer"></div>
<div class="note" id="vtx_no_band">
<div class="note_spacer">
<p data-i18n="configurationVTXNoBandHelp"></p>
</div>
</div>
<div class="select vtx_band_wrapper">
<select id="vtx_band"></select>
<label for="vtx_band">
<span data-i18n="configurationVTXBand"></span>
</label>
</div>
<div class="select vtx_channel_wrapper">
<select id="vtx_channel"></select>
<label for="vtx_channel"> <span data-i18n="configurationVTXChannel"></span></label>
</div>
<div class="select">
<select id="vtx_power"></select>
<label for="vtx_power"><span data-i18n="configurationVTXPower"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationVTXPowerHelp"></div>
</div>
<div class="select">
<select id="vtx_low_power_disarm"></select>
<label for="vtx_power"><span data-i18n="configurationVTXLowerPowerDisarm"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationVTXLowerPowerDisarmHelp"></div>
</div>
<div class="features other"></div>
<!--feature list generated content-->
</div>
</div>
@ -271,14 +218,41 @@
</div>
</div>
<div class="config-section gui_box grey other">
<div class="config-section gui_box grey config-vtx">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="configurationFeatures"></div>
<div class="spacer_box_title" data-i18n="configurationVTX"></div>
</div>
<div class="spacer_box">
<div class="features other"></div>
<!--feature list generated content-->
<div class="info-box" data-i18n="vtxDisclaimer"></div>
<div class="note" id="vtx_no_band">
<div class="note_spacer">
<p data-i18n="configurationVTXNoBandHelp"></p>
</div>
</div>
<div class="select vtx_band_wrapper">
<select id="vtx_band"></select>
<label for="vtx_band">
<span data-i18n="configurationVTXBand"></span>
</label>
</div>
<div class="select vtx_channel_wrapper">
<select id="vtx_channel"></select>
<label for="vtx_channel"> <span data-i18n="configurationVTXChannel"></span></label>
</div>
<div class="select">
<select id="vtx_power"></select>
<label for="vtx_power"><span data-i18n="configurationVTXPower"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationVTXPowerHelp"></div>
</div>
<div class="select">
<select id="vtx_low_power_disarm"></select>
<label for="vtx_power"><span data-i18n="configurationVTXLowerPowerDisarm"></span></label>
<div class="helpicon cf_tip" data-i18n_title="configurationVTXLowerPowerDisarmHelp"></div>
</div>
</div>
</div>

@ -15,12 +15,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
var loadChain = [
mspHelper.loadFeatures,
mspHelper.loadArmingConfig,
mspHelper.load3dConfig,
mspHelper.loadSensorAlignment,
mspHelper.loadAdvancedConfig,
mspHelper.loadINAVPidConfig,
mspHelper.loadVTXConfig,
mspHelper.loadMixerConfig,
mspHelper.loadBoardAlignment,
mspHelper.loadCurrentMeterConfig,
mspHelper.loadMiscV2
@ -33,12 +30,10 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
var saveChainer = new MSPChainerClass();
var saveChain = [
mspHelper.save3dConfig,
mspHelper.saveSensorAlignment,
mspHelper.saveAccTrim,
mspHelper.saveArmingConfig,
mspHelper.saveAdvancedConfig,
mspHelper.saveINAVPidConfig,
mspHelper.saveVTXConfig,
mspHelper.saveBoardAlignment,
mspHelper.saveCurrentMeterConfig,
@ -268,10 +263,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$i2cSpeed.change();
$('#3ddeadbandlow').val(REVERSIBLE_MOTORS.deadband_low);
$('#3ddeadbandhigh').val(REVERSIBLE_MOTORS.deadband_high);
$('#3dneutral').val(REVERSIBLE_MOTORS.neutral);
$('a.save').click(function () {
MISC.mag_declination = parseFloat($('#mag_declination').val());
@ -290,10 +281,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
MISC.battery_capacity_critical = parseInt($('#battery_capacity_critical').val() * MISC.battery_capacity / 100);
MISC.battery_capacity_unit = $('#battery_capacity_unit').val();
REVERSIBLE_MOTORS.deadband_low = parseInt($('#3ddeadbandlow').val());
REVERSIBLE_MOTORS.deadband_high = parseInt($('#3ddeadbandhigh').val());
REVERSIBLE_MOTORS.neutral = parseInt($('#3dneutral').val());
SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val());
googleAnalytics.sendEvent('Setting', 'I2CSpeed', $('#i2c_speed').children("option:selected").text());

@ -67,13 +67,33 @@
<span data-i18n="motor_poles"></span>
</label>
</div>
<div id="reversible-esc-info" data-i18n="reversibleEscWarning" class="info-box"></div>
<div data-i18n="reversibleEscWarning" class="info-box for-reversible-motors"></div>
<div class="checkbox">
<input type="checkbox" data-bit="12" class="feature toggle" name="REVERSIBLE_MOTORS" title="REVERSIBLE_MOTORS" id="feature-12">
<label for="feature-12">
<span data-i18n="featureREVERSIBLE_MOTORS"></span>
</label>
</div>
<div class="for-reversible-motors">
<div class="number">
<input type="number" id="3ddeadbandlow" name="3ddeadbandlow" step="1" min="1425" max="1500" />
<label for="3ddeadbandlow">
<span data-i18n="configuration3dDeadbandLow"></span>
</label>
</div>
<div class="number">
<input type="number" id="3ddeadbandhigh" name="3ddeadbandhigh" step="1" min="1500" max="1575" />
<label for="3ddeadbandhigh">
<span data-i18n="configuration3dDeadbandHigh"></span>
</label>
</div>
<div class="number">
<input type="number" id="3dneutral" name="3dneutral" step="1" min="1475" max="1525" />
<label for="3dneutral">
<span data-i18n="configuration3dNeutral"></span>
</label>
</div>
</div>
</div>
</div>
<div class="gui_box grey">

@ -52,6 +52,7 @@ TABS.outputs.initialize = function (callback) {
mspHelper.sendServoConfigurations,
mspHelper.saveAdvancedConfig,
mspHelper.saveMiscV2,
mspHelper.save3dConfig,
mspHelper.saveToEeprom
]);
saveChainer.setExitPoint(function () {
@ -96,7 +97,7 @@ TABS.outputs.initialize = function (callback) {
$idlePercent = $('#throttle_idle'),
$idleInfoBox = $("#throttle_idle-info"),
$motorStopWarningBox = $("#motor-stop-warning"),
$reversibleMotorBox = $("#reversible-esc-info")
$reversibleMotorBox = $(".for-reversible-motors");
function buildMotorRates() {
var protocolData = escProtocols[ADVANCED_CONFIG.motorPwmProtocol];
@ -221,6 +222,10 @@ TABS.outputs.initialize = function (callback) {
}
$motorStopCheckbox.change(showHideMotorStopWarning);
showHideMotorStopWarning();
$('#3ddeadbandlow').val(REVERSIBLE_MOTORS.deadband_low);
$('#3ddeadbandhigh').val(REVERSIBLE_MOTORS.deadband_high);
$('#3dneutral').val(REVERSIBLE_MOTORS.neutral);
}
function update_arm_status() {
@ -365,6 +370,10 @@ TABS.outputs.initialize = function (callback) {
SERVO_CONFIG[info.obj].rate = rate;
});
REVERSIBLE_MOTORS.deadband_low = parseInt($('#3ddeadbandlow').val());
REVERSIBLE_MOTORS.deadband_high = parseInt($('#3ddeadbandhigh').val());
REVERSIBLE_MOTORS.neutral = parseInt($('#3dneutral').val());
//Save configuration to FC
saveChainer.execute();
}

Loading…
Cancel
Save