mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 17:55:21 +03:00
fixed bugs with not detecting new mixer capable firmware
This commit is contained in:
parent
26c65fa39c
commit
e9d2a06b7e
5 changed files with 22 additions and 5 deletions
|
@ -2515,5 +2515,8 @@
|
||||||
},
|
},
|
||||||
"mixerPresetTitle": {
|
"mixerPresetTitle": {
|
||||||
"message": "Mixer preset"
|
"message": "Mixer preset"
|
||||||
|
},
|
||||||
|
"fcFirmwareUpdateRequired": {
|
||||||
|
"message": "Flight Controller firmware has to be updated to latest version to use this function"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<div class="tab-configuration tab-mixer toolbar_fixed_bottom">
|
<div class="tab-configuration tab-mixer toolbar_fixed_bottom">
|
||||||
<div class="content_wrapper">
|
<div class="content_wrapper is-hidden" id="mixer-hidden-content"><p data-i18n="fcFirmwareUpdateRequired"></p></div>
|
||||||
|
<div class="content_wrapper" id="mixer-main-content">
|
||||||
<div class="tab_title" data-i18n="tabMixer">Mixer</div>
|
<div class="tab_title" data-i18n="tabMixer">Mixer</div>
|
||||||
<!-- Top row -->
|
<!-- Top row -->
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -158,6 +158,11 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
function processHtml() {
|
function processHtml() {
|
||||||
|
|
||||||
|
if (!FC.isNewMixer()) {
|
||||||
|
$('#mixer-hidden-content').removeClass("is-hidden");
|
||||||
|
$('#mixer-main-content').remove();
|
||||||
|
}
|
||||||
|
|
||||||
$servoMixTable = $('#servo-mix-table');
|
$servoMixTable = $('#servo-mix-table');
|
||||||
$servoMixTableBody = $servoMixTable.find('tbody');
|
$servoMixTableBody = $servoMixTable.find('tbody');
|
||||||
$motorMixTable = $('#motor-mix-table');
|
$motorMixTable = $('#motor-mix-table');
|
||||||
|
@ -184,7 +189,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
$platformSelect.find("*").remove();
|
$platformSelect.find("*").remove();
|
||||||
|
|
||||||
for (i in platforms) {
|
for (let i in platforms) {
|
||||||
if (platforms.hasOwnProperty(i)) {
|
if (platforms.hasOwnProperty(i)) {
|
||||||
let p = platforms[i];
|
let p = platforms[i];
|
||||||
$platformSelect.append('<option value="' + p.id + '">' + p.name + '</option>');
|
$platformSelect.append('<option value="' + p.id + '">' + p.name + '</option>');
|
||||||
|
|
|
@ -188,7 +188,11 @@ TABS.motors.initialize = function (callback) {
|
||||||
$motorsEnableTestMode.prop('checked', false);
|
$motorsEnableTestMode.prop('checked', false);
|
||||||
$motorsEnableTestMode.prop('disabled', true);
|
$motorsEnableTestMode.prop('disabled', true);
|
||||||
|
|
||||||
update_model(MIXER_CONFIG.appliedMixerPreset);
|
if (FC.isNewMixer()) {
|
||||||
|
update_model(MIXER_CONFIG.appliedMixerPreset);;
|
||||||
|
} else {
|
||||||
|
update_model(BF_CONFIG.mixerConfiguration);
|
||||||
|
}
|
||||||
|
|
||||||
// Always start with default/empty sensor data array, clean slate all
|
// Always start with default/empty sensor data array, clean slate all
|
||||||
initSensorData();
|
initSensorData();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*global chrome*/
|
/*global $,chrome,FC,helper,mspHelper,MIXER_CONFIG,BF_CONFIG*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
TABS.setup = {
|
TABS.setup = {
|
||||||
|
@ -240,7 +240,11 @@ TABS.setup.initialize3D = function () {
|
||||||
//
|
//
|
||||||
// load the model including materials
|
// load the model including materials
|
||||||
if (useWebGlRenderer) {
|
if (useWebGlRenderer) {
|
||||||
|
if (FC.isNewMixer()) {
|
||||||
|
model_file = helper.mixer.getById(MIXER_CONFIG.appliedMixerPreset).model;
|
||||||
|
} else {
|
||||||
model_file = helper.mixer.getById(BF_CONFIG.mixerConfiguration).model;
|
model_file = helper.mixer.getById(BF_CONFIG.mixerConfiguration).model;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
model_file = 'fallback'
|
model_file = 'fallback'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue