mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 04:15:28 +03:00
minimum mixer profile support
This commit is contained in:
parent
df23369925
commit
0a6228a8c0
3 changed files with 9 additions and 6 deletions
6
js/fc.js
6
js/fc.js
|
@ -195,6 +195,7 @@ var FC = {
|
||||||
MIXER_CONFIG = {
|
MIXER_CONFIG = {
|
||||||
yawMotorDirection: 0,
|
yawMotorDirection: 0,
|
||||||
yawJumpPreventionLimit: 0,
|
yawJumpPreventionLimit: 0,
|
||||||
|
motorStopOnLow: false,
|
||||||
platformType: -1,
|
platformType: -1,
|
||||||
hasFlaps: false,
|
hasFlaps: false,
|
||||||
appliedMixerPreset: -1,
|
appliedMixerPreset: -1,
|
||||||
|
@ -554,7 +555,6 @@ var FC = {
|
||||||
getFeatures: function () {
|
getFeatures: function () {
|
||||||
var features = [
|
var features = [
|
||||||
{bit: 1, group: 'batteryVoltage', name: 'VBAT'},
|
{bit: 1, group: 'batteryVoltage', name: 'VBAT'},
|
||||||
{bit: 4, group: 'other', name: 'MOTOR_STOP'},
|
|
||||||
{bit: 6, group: 'other', name: 'SOFTSERIAL', haveTip: true, showNameInTip: true},
|
{bit: 6, group: 'other', name: 'SOFTSERIAL', haveTip: true, showNameInTip: true},
|
||||||
{bit: 7, group: 'other', name: 'GPS', haveTip: true},
|
{bit: 7, group: 'other', name: 'GPS', haveTip: true},
|
||||||
{bit: 10, group: 'other', name: 'TELEMETRY', showNameInTip: true},
|
{bit: 10, group: 'other', name: 'TELEMETRY', showNameInTip: true},
|
||||||
|
@ -880,6 +880,7 @@ var FC = {
|
||||||
'GVAR 5', // 35
|
'GVAR 5', // 35
|
||||||
'GVAR 6', // 36
|
'GVAR 6', // 36
|
||||||
'GVAR 7', // 37
|
'GVAR 7', // 37
|
||||||
|
'Mixer Transition', // 38
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
getServoMixInputName: function (input) {
|
getServoMixInputName: function (input) {
|
||||||
|
@ -1263,11 +1264,12 @@ var FC = {
|
||||||
30: "CRSF SNR",
|
30: "CRSF SNR",
|
||||||
31: "GPS Valid Fix",
|
31: "GPS Valid Fix",
|
||||||
32: "Loiter Radius [cm]",
|
32: "Loiter Radius [cm]",
|
||||||
33: "Active Profile",
|
33: "Active PIDProfile",
|
||||||
34: "Battery cells",
|
34: "Battery cells",
|
||||||
35: "AGL status [0/1]",
|
35: "AGL status [0/1]",
|
||||||
36: "AGL [cm]",
|
36: "AGL [cm]",
|
||||||
37: "Rangefinder [cm]",
|
37: "Rangefinder [cm]",
|
||||||
|
38: "Active MixerProfile",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
3: {
|
3: {
|
||||||
|
|
|
@ -1453,7 +1453,8 @@ var mspHelper = (function (gui) {
|
||||||
break;
|
break;
|
||||||
case MSPCodes.MSP2_INAV_MIXER:
|
case MSPCodes.MSP2_INAV_MIXER:
|
||||||
MIXER_CONFIG.yawMotorDirection = data.getInt8(0);
|
MIXER_CONFIG.yawMotorDirection = data.getInt8(0);
|
||||||
MIXER_CONFIG.yawJumpPreventionLimit = data.getUint16(1, true);
|
MIXER_CONFIG.yawJumpPreventionLimit = data.getUint8(1, true);
|
||||||
|
MIXER_CONFIG.motorStopOnLow = data.getUint8(1, true);
|
||||||
MIXER_CONFIG.platformType = data.getInt8(3);
|
MIXER_CONFIG.platformType = data.getInt8(3);
|
||||||
MIXER_CONFIG.hasFlaps = data.getInt8(4);
|
MIXER_CONFIG.hasFlaps = data.getInt8(4);
|
||||||
MIXER_CONFIG.appliedMixerPreset = data.getInt16(5, true);
|
MIXER_CONFIG.appliedMixerPreset = data.getInt16(5, true);
|
||||||
|
@ -2154,8 +2155,8 @@ var mspHelper = (function (gui) {
|
||||||
|
|
||||||
case MSPCodes.MSP2_INAV_SET_MIXER:
|
case MSPCodes.MSP2_INAV_SET_MIXER:
|
||||||
buffer.push(MIXER_CONFIG.yawMotorDirection);
|
buffer.push(MIXER_CONFIG.yawMotorDirection);
|
||||||
buffer.push(lowByte(MIXER_CONFIG.yawJumpPreventionLimit));
|
buffer.push(MIXER_CONFIG.yawJumpPreventionLimit);
|
||||||
buffer.push(highByte(MIXER_CONFIG.yawJumpPreventionLimit));
|
buffer.push(MIXER_CONFIG.motorStopOnLow);
|
||||||
buffer.push(MIXER_CONFIG.platformType);
|
buffer.push(MIXER_CONFIG.platformType);
|
||||||
buffer.push(MIXER_CONFIG.hasFlaps);
|
buffer.push(MIXER_CONFIG.hasFlaps);
|
||||||
buffer.push(lowByte(MIXER_CONFIG.appliedMixerPreset));
|
buffer.push(lowByte(MIXER_CONFIG.appliedMixerPreset));
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<div id="motor-stop-warning" data-i18n="motorStopWarning" class="warning-box"></div>
|
<div id="motor-stop-warning" data-i18n="motorStopWarning" class="warning-box"></div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<input type="checkbox" data-bit="4" class="feature toggle" name="MOTOR_STOP" title="MOTOR_STOP" id="feature-4">
|
<input id="feature-4" type="checkbox" class="toggle" data-setting="motorstop_on_low" />
|
||||||
<label for="feature-4">
|
<label for="feature-4">
|
||||||
<span data-i18n="featureMOTOR_STOP"></span>
|
<span data-i18n="featureMOTOR_STOP"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue