chore(cpn): move capabilities from firmware to boards, remove unused (#7070)
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#define CPN_MAX_CHNOUT 32 // number of real output channels
|
||||
#define CPN_MAX_LOGICAL_SWITCHES 64 // number of custom switches
|
||||
#define CPN_MAX_SPECIAL_FUNCTIONS 64 // number of functions assigned to switches
|
||||
#define CPN_MAX_MODELS 60 // B&W
|
||||
#define CPN_MAX_MODULES 2
|
||||
#define CPN_MAX_STICKS Board::STICK_AXIS_COUNT
|
||||
#define CPN_MAX_TRIMS Board::TRIM_AXIS_COUNT
|
||||
@@ -45,6 +46,7 @@
|
||||
#define CPN_MAX_SENSORS 99
|
||||
#define CPN_MAX_SCRIPTS 9
|
||||
#define CPN_MAX_SCRIPT_INPUTS 10
|
||||
#define CPN_MAX_SCRIPT_OUTPUTS 6
|
||||
#define CPN_MAX_SPACEMOUSE 6
|
||||
#define CPN_MAX_INPUTS 32 // v2.10 replaces CPN_MAX_ANALOGS - the value is abitary as radio ADC refactor is still a WIP
|
||||
|
||||
|
||||
@@ -305,19 +305,94 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
|
||||
// TODO investigate usage of any that should be covered in BoardJson::getCapability or are no longer required
|
||||
// some could be used when importing pre v2.10 configurations
|
||||
switch (capability) {
|
||||
case BacklightLevelMin:
|
||||
if (IS_HORUS_X12S(board)) {
|
||||
return 5;
|
||||
} else if (IS_FAMILY_T16(board) || IS_FLYSKY_EL18(board) || IS_FLYSKY_NV14(board)
|
||||
|| IS_FLYSKY_ST16(board) || IS_FAMILY_PL18(board)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 46;
|
||||
}
|
||||
|
||||
case HasAuxSerialMode:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) &&
|
||||
!(IS_FLYSKY_NV14(board) || IS_FLYSKY_EL18(board) ||
|
||||
IS_FAMILY_PL18(board) || IS_FLYSKY_ST16(board))) ||
|
||||
(IS_TARANIS_X9(board) && !IS_TARANIS_X9DP_2019(board)) ||
|
||||
IS_RADIOMASTER_ZORRO(board) || IS_RADIOMASTER_TX12_MK2(board) ||
|
||||
IS_RADIOMASTER_MT12(board);
|
||||
|
||||
case HasAux2SerialMode:
|
||||
return IS_FAMILY_T16(board);
|
||||
|
||||
case HasBluetooth:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X7(board) ||
|
||||
IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) ||
|
||||
IS_TARANIS_X9DP_2019(board) || IS_FLYSKY_NV14(board) ||
|
||||
IS_FLYSKY_EL18(board) || IS_FAMILY_PL18(board));
|
||||
|
||||
case HasIMU:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS(board) || IS_RADIOMASTER_TX15(board));
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS(board) ||
|
||||
IS_RADIOMASTER_TX15(board));
|
||||
|
||||
case HasSoftwareSerialPower:
|
||||
return IS_RADIOMASTER_TX16S(board);
|
||||
|
||||
case HasSwitchableJack:
|
||||
return IS_TARANIS_XLITES(board);
|
||||
|
||||
case HasTrainerModuleCPPM:
|
||||
return (getCapability(board, HasTrainerModuleSBUS) || IS_FAMILY_HORUS_OR_T16(board));
|
||||
return (getCapability(board, HasTrainerModuleSBUS) ||
|
||||
IS_FAMILY_HORUS_OR_T16(board));
|
||||
|
||||
case HasTrainerModuleSBUS:
|
||||
return ((IS_TARANIS_X9LITE(board) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_X9LITES(board)) ||
|
||||
IS_TARANIS_X9DP_2019(board) || IS_TARANIS_X7_ACCESS(board) || IS_RADIOMASTER_ZORRO(board) ||
|
||||
IS_RADIOMASTER_TX12_MK2(board) || IS_RADIOMASTER_BOXER(board) || IS_RADIOMASTER_POCKET(board) ||
|
||||
IS_RADIOMASTER_MT12(board) || IS_RADIOMASTER_GX12(board) || IS_JUMPER_T20(board) ||
|
||||
IS_JUMPER_BUMBLEBEE(board)) || IS_FAMILY_T16(board) || IS_FAMILY_HORUS(board) ||
|
||||
(getCapability(board, HasExternalModuleSupport) && (IS_TARANIS(board) && !IS_FAMILY_T12(board))));
|
||||
return ((IS_TARANIS_X9LITE(board) ||
|
||||
(IS_TARANIS_XLITE(board) && !IS_TARANIS_X9LITES(board)) ||
|
||||
IS_TARANIS_X9DP_2019(board) || IS_TARANIS_X7_ACCESS(board) ||
|
||||
IS_RADIOMASTER_ZORRO(board) || IS_RADIOMASTER_TX12_MK2(board) ||
|
||||
IS_RADIOMASTER_BOXER(board) || IS_RADIOMASTER_POCKET(board) ||
|
||||
IS_RADIOMASTER_MT12(board) || IS_RADIOMASTER_GX12(board) ||
|
||||
IS_JUMPER_T20(board) || IS_JUMPER_BUMBLEBEE(board)) ||
|
||||
IS_FAMILY_T16(board) || IS_FAMILY_HORUS(board) ||
|
||||
(getCapability(board, HasExternalModuleSupport) &&
|
||||
(IS_TARANIS(board) && !IS_FAMILY_T12(board))));
|
||||
|
||||
case HasVCPSerialMode:
|
||||
return IS_FAMILY_HORUS_OR_T16(board) || IS_JUMPER_TPRO(board) ||
|
||||
IS_RADIOMASTER_BOXER(board) || IS_RADIOMASTER_MT12(board) ||
|
||||
IS_RADIOMASTER_POCKET(board) || IS_RADIOMASTER_TX12_MK2(board) ||
|
||||
IS_RADIOMASTER_ZORRO(board);
|
||||
|
||||
case MaxContrast:
|
||||
if (IS_TARANIS_SMALL(board))
|
||||
return 30;
|
||||
else
|
||||
return 45;
|
||||
|
||||
case MaxVolume:
|
||||
return 23;
|
||||
|
||||
case MinContrast:
|
||||
if (IS_TARANIS_X9(board))
|
||||
return 0;
|
||||
else
|
||||
return 10;
|
||||
|
||||
case PwrButtonPress:
|
||||
return (board != Board::BOARD_TARANIS_X9D && board != Board::BOARD_TARANIS_X9DP);
|
||||
|
||||
case RotaryEncoderNavigation:
|
||||
return (IS_TARANIS_X7(board) || IS_TARANIS_X9DP_2019(board) ||
|
||||
IS_TARANIS_X9E(board) || IS_TARANIS_X9LITE(board) ||
|
||||
IS_JUMPER_T15(board) || IS_JUMPER_T18(board) || IS_JUMPER_T20(board)||
|
||||
IS_JUMPER_TPRO(board) || IS_RADIOMASTER_BOXER(board) ||
|
||||
IS_RADIOMASTER_GX12(board) || IS_RADIOMASTER_MT12(board) ||
|
||||
IS_RADIOMASTER_POCKET(board) || IS_RADIOMASTER_TX12(board) ||
|
||||
IS_RADIOMASTER_TX12_MK2(board) || IS_RADIOMASTER_TX16S(board) ||
|
||||
IS_RADIOMASTER_ZORRO(board) || IS_RADIOMASTER_TX15(board) ||
|
||||
IS_JUMPER_T15PRO(board) || IS_FLYSKY_PA01(board) ||
|
||||
IS_FLYSKY_ST16(board) || IS_RADIOMASTER_TX16SMK3(board));
|
||||
|
||||
default:
|
||||
return getBoardJson(board)->getCapability(capability);
|
||||
@@ -1102,3 +1177,13 @@ bool Boards::isSurface(Board::Type board)
|
||||
{
|
||||
return getCapability(board == Board::BOARD_UNKNOWN ? getCurrentBoard() : board, Board::Surface);
|
||||
}
|
||||
|
||||
void Boards::tests()
|
||||
{
|
||||
qDebug() << "**** Board checks ****";
|
||||
for (int i = 0; i < BOARD_TYPE_COUNT; i++) {
|
||||
if (!IS_HORUS_OR_TARANIS((Type)i))
|
||||
qDebug() << "Not member of" << "IS_HORUS_OR_TARANIS" << getBoardName((Type)i);
|
||||
}
|
||||
qDebug() << "**** Board checks ****";
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ namespace Board {
|
||||
|
||||
enum Capability {
|
||||
Air,
|
||||
BacklightLevelMin,
|
||||
FlexInputs,
|
||||
FlexSwitches,
|
||||
FunctionSwitchColors,
|
||||
@@ -220,7 +221,10 @@ namespace Board {
|
||||
GyroAxes,
|
||||
Gyros,
|
||||
HasAudioMuteGPIO,
|
||||
HasAuxSerialMode,
|
||||
HasAux2SerialMode,
|
||||
HasBacklightColor,
|
||||
HasBluetooth,
|
||||
HasColorLcd,
|
||||
HasExternalModuleSupport,
|
||||
HasIMU,
|
||||
@@ -229,9 +233,12 @@ namespace Board {
|
||||
HasBlingLEDS,
|
||||
HasRTC,
|
||||
HasSDCard,
|
||||
HasSoftwareSerialPower,
|
||||
HasSwitchableJack,
|
||||
HasTrainerModuleCPPM,
|
||||
HasTrainerModuleSBUS,
|
||||
HasVBat,
|
||||
HasVCPSerialMode,
|
||||
Inputs,
|
||||
InputSwitches,
|
||||
JoystickAxes,
|
||||
@@ -241,12 +248,17 @@ namespace Board {
|
||||
LcdHeight,
|
||||
LcdOLED,
|
||||
LcdWidth,
|
||||
MaxContrast,
|
||||
MaxVolume,
|
||||
MinContrast,
|
||||
MultiposPots,
|
||||
MultiposPotsPositions,
|
||||
NumFunctionSwitchesPositions,
|
||||
NumTrims,
|
||||
NumTrimSwitches,
|
||||
Pots,
|
||||
PwrButtonPress,
|
||||
RotaryEncoderNavigation,
|
||||
Sliders,
|
||||
SportMaxBaudRate,
|
||||
StandardSwitches,
|
||||
@@ -469,6 +481,8 @@ class Boards
|
||||
static bool isAir(Board::Type board = Board::BOARD_UNKNOWN);
|
||||
static bool isSurface(Board::Type board = Board::BOARD_UNKNOWN);
|
||||
|
||||
static void tests();
|
||||
|
||||
private:
|
||||
|
||||
Board::Type m_boardType = Board::BOARD_UNKNOWN;
|
||||
@@ -640,6 +654,7 @@ inline bool IS_FAMILY_T16(Board::Type board)
|
||||
return board == Board::BOARD_FATFISH_F16 ||
|
||||
board == Board::BOARD_HELLORADIOSKY_V16 ||
|
||||
board == Board::BOARD_JUMPER_T15 ||
|
||||
board == Board::BOARD_JUMPER_T15PRO ||
|
||||
board == Board::BOARD_JUMPER_T16 ||
|
||||
board == Board::BOARD_JUMPER_T18 ||
|
||||
board == Board::BOARD_RADIOMASTER_TX15 ||
|
||||
@@ -683,6 +698,11 @@ inline bool IS_FLYSKY_EL18(Board::Type board)
|
||||
return (board == Board::BOARD_FLYSKY_EL18);
|
||||
}
|
||||
|
||||
inline bool IS_FLYSKY_NB4P(Board::Type board)
|
||||
{
|
||||
return (board == Board::BOARD_FLYSKY_NB4P);
|
||||
}
|
||||
|
||||
inline bool IS_FLYSKY_PA01(Board::Type board)
|
||||
{
|
||||
return (board == Board::BOARD_FLYSKY_PA01);
|
||||
@@ -792,7 +812,8 @@ inline bool IS_FAMILY_HORUS_OR_T16(Board::Type board)
|
||||
{
|
||||
return IS_FAMILY_HORUS(board) || IS_FAMILY_T16(board) ||
|
||||
IS_FLYSKY_NV14(board)/*generally*/ || IS_FLYSKY_EL18(board)/*generally*/
|
||||
|| IS_FAMILY_PL18(board) || IS_FLYSKY_ST16(board)/*generally*/ || IS_FLYSKY_PA01(board)/*generally*/;
|
||||
|| IS_FAMILY_PL18(board) || IS_FLYSKY_ST16(board)/*generally*/ ||
|
||||
IS_FLYSKY_PA01(board)/*generally*/ || IS_FLYSKY_NB4P(board)/*generally*/;
|
||||
}
|
||||
|
||||
inline bool IS_HORUS_OR_TARANIS(Board::Type board)
|
||||
|
||||
@@ -111,25 +111,7 @@ QString CurveReference::functionToString(const int value)
|
||||
// static
|
||||
bool CurveReference::isTypeAvailable(const CurveRefType type)
|
||||
{
|
||||
bool ret = false;
|
||||
Firmware * fw = getCurrentFirmware();
|
||||
|
||||
switch(type) {
|
||||
case CURVE_REF_DIFF:
|
||||
if (fw->getCapability(HasInputDiff))
|
||||
ret = true;
|
||||
break;
|
||||
case CURVE_REF_EXPO:
|
||||
if (fw->getCapability(HasMixerExpo))
|
||||
ret = true;
|
||||
break;
|
||||
case CURVE_REF_FUNC:
|
||||
case CURVE_REF_CUSTOM:
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -90,8 +90,6 @@ QString CustomFunctionData::funcToString(const AssignFunc func, const ModelData
|
||||
return tr("Vario");
|
||||
else if (func == FuncPlayPrompt)
|
||||
return tr("Play Track");
|
||||
else if (func == FuncPlayBoth)
|
||||
return tr("Play Both");
|
||||
else if (func == FuncPlayValue)
|
||||
return tr("Play Value");
|
||||
else if (func == FuncPlayScript)
|
||||
@@ -181,13 +179,8 @@ QString CustomFunctionData::paramToString(const ModelData * model) const
|
||||
else if (func == FuncVolume || func == FuncPlayValue || func == FuncBacklight) {
|
||||
return RawSource(param).toString(model);
|
||||
}
|
||||
else if (func == FuncPlayPrompt || func == FuncPlayBoth) {
|
||||
if ( getCurrentFirmware()->getCapability(VoicesAsNumbers)) {
|
||||
return QString("%1").arg(param);
|
||||
}
|
||||
else {
|
||||
return paramarm;
|
||||
}
|
||||
else if (func == FuncPlayPrompt) {
|
||||
return paramarm;
|
||||
}
|
||||
else if (func >= FuncAdjustGV1 && func <= FuncAdjustGVLast) {
|
||||
switch (adjustMode) {
|
||||
@@ -252,11 +245,8 @@ bool CustomFunctionData::isFuncAvailable(const int index, const ModelData * mode
|
||||
Firmware * fw = getCurrentFirmware();
|
||||
|
||||
bool ret = (((index >= FuncOverrideCH1 && index <= FuncOverrideCHLast) && !fw->getCapability(SafetyChannelCustomFunction)) ||
|
||||
((index == FuncVolume || index == FuncBackgroundMusic || index == FuncBackgroundMusicPause) && !fw->getCapability(HasVolume)) ||
|
||||
((index == FuncPlayScript && !IS_HORUS_OR_TARANIS(fw->getBoard()))) ||
|
||||
((index == FuncPlayHaptic) && !fw->getCapability(Haptic)) ||
|
||||
((index == FuncPlayBoth) && !fw->getCapability(HasBeeper)) ||
|
||||
((index == FuncLogs) && !fw->getCapability(HasSDLogs)) ||
|
||||
((index >= FuncSetTimer1 && index <= FuncSetTimerLast) &&
|
||||
(index > FuncSetTimer1 + fw->getCapability(Timers) ||
|
||||
(model ? model->timers[index - FuncSetTimer1].isModeOff() : false))) ||
|
||||
@@ -522,7 +512,6 @@ bool CustomFunctionData::isRepeatParamAvailable(const AssignFunc func)
|
||||
FuncPlayHaptic,
|
||||
FuncPlayValue,
|
||||
FuncPlayPrompt,
|
||||
FuncPlayBoth,
|
||||
FuncSetScreen
|
||||
};
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ enum AssignFunc {
|
||||
FuncSetTimerLast = FuncSetTimer1 + CPN_MAX_TIMERS - 1,
|
||||
FuncVario,
|
||||
FuncPlayPrompt,
|
||||
FuncPlayBoth,
|
||||
FuncPlayValue,
|
||||
FuncPlayScript,
|
||||
FuncLogs,
|
||||
|
||||
@@ -47,133 +47,72 @@ const uint8_t modn12x3[8][4]= {
|
||||
};
|
||||
|
||||
enum Capability {
|
||||
Models,
|
||||
ModelName,
|
||||
ChannelsName,
|
||||
CustomFunctions,
|
||||
DangerousFunctions,
|
||||
ExtendedTrimsRange,
|
||||
FlightModes,
|
||||
FlightModesName,
|
||||
FlightModesHaveFades,
|
||||
Imperial,
|
||||
Mixes,
|
||||
Timers,
|
||||
TimersName,
|
||||
VoicesAsNumbers,
|
||||
VoicesMaxLength,
|
||||
MultiLangVoice,
|
||||
HasModelImage,
|
||||
ModelImageNameLen,
|
||||
ModelImageFilters,
|
||||
ModelImageKeepExtn,
|
||||
CustomFunctions,
|
||||
SafetyChannelCustomFunction,
|
||||
LogicalSwitches,
|
||||
CustomAndSwitches,
|
||||
HasNegAndSwitches,
|
||||
LogicalSwitchesExt,
|
||||
Outputs,
|
||||
ChannelsName,
|
||||
ExtraInputs,
|
||||
TrimsRange,
|
||||
ExtendedTrimsRange,
|
||||
NumCurves,
|
||||
NumCurvePoints,
|
||||
OffsetWeight,
|
||||
Simulation,
|
||||
SoundMod,
|
||||
SoundPitch,
|
||||
MaxVolume,
|
||||
MaxContrast,
|
||||
MinContrast,
|
||||
Haptic,
|
||||
HasBeeper,
|
||||
ModelTrainerEnable,
|
||||
HasExpoNames,
|
||||
HasNoExpo,
|
||||
HasMixerNames,
|
||||
HasCvNames,
|
||||
HasPxxCountry,
|
||||
HasPPMStart,
|
||||
HasGeneralUnits,
|
||||
HasFAIMode,
|
||||
OptrexDisplay,
|
||||
PPMExtCtrl,
|
||||
PPMFrameLength,
|
||||
Telemetry,
|
||||
TelemetryUnits,
|
||||
TelemetryBars,
|
||||
Heli,
|
||||
Gvars,
|
||||
GvarsInCS,
|
||||
GvarsAreNamed,
|
||||
GvarsFlightModes,
|
||||
GvarsName,
|
||||
NoTelemetryProtocol,
|
||||
TelemetryCustomScreens,
|
||||
TelemetryCustomScreensBars,
|
||||
TelemetryCustomScreensLines,
|
||||
TelemetryCustomScreensFieldsPerLine,
|
||||
TelemetryMaxMultiplier,
|
||||
HasVario,
|
||||
HasVarioSink,
|
||||
HasFailsafe,
|
||||
HasSoundMixer,
|
||||
NumModules,
|
||||
NumFirstUsableModule,
|
||||
HasModuleR9MFlex,
|
||||
HasModuleR9MMini,
|
||||
PPMCenter,
|
||||
SYMLimits,
|
||||
HastxCurrentCalibration,
|
||||
HasVolume,
|
||||
HasBrightness,
|
||||
PerModelTimers,
|
||||
SlowScale,
|
||||
SlowRange,
|
||||
PermTimers,
|
||||
HasSDLogs,
|
||||
CSFunc,
|
||||
GetThrSwitch,
|
||||
HasDisplayText,
|
||||
HasTopLcd,
|
||||
GlobalFunctions,
|
||||
VirtualInputs,
|
||||
InputsLength,
|
||||
TrainerInputs,
|
||||
SportTelemetry,
|
||||
LuaScripts,
|
||||
LuaInputsPerScript,
|
||||
LuaOutputsPerScript,
|
||||
LimitsPer1000,
|
||||
EnhancedCurves,
|
||||
HasFasOffset,
|
||||
HasMahPersistent,
|
||||
MavlinkTelemetry,
|
||||
HasInputDiff,
|
||||
HasMixerExpo,
|
||||
HasBatMeterRange,
|
||||
DangerousFunctions,
|
||||
HasModelLabels,
|
||||
HasSwitchableJack,
|
||||
HasSportConnector,
|
||||
PwrButtonPress,
|
||||
Sensors,
|
||||
HasAuxSerialMode,
|
||||
HasAux2SerialMode,
|
||||
HasVCPSerialMode,
|
||||
HasBluetooth,
|
||||
HasADCJitterFilter,
|
||||
HasTelemetryBaudrate,
|
||||
TopBarZones,
|
||||
HasModelsList,
|
||||
Gvars,
|
||||
GvarsName,
|
||||
Haptic, // TODO remove with X9D
|
||||
HasExpoNames,
|
||||
HasFailsafe,
|
||||
HasFlySkyGimbals,
|
||||
RotaryEncoderNavigation,
|
||||
HasSoftwareSerialPower,
|
||||
HasIntModuleMulti,
|
||||
HasIntModuleCRSF,
|
||||
HasIntModuleELRS,
|
||||
HasIntModuleFlySky,
|
||||
BacklightLevelMin,
|
||||
QMFavourites,
|
||||
HasIntModuleMulti,
|
||||
HasMixerNames,
|
||||
HasModelImage,
|
||||
HasModelLabels,
|
||||
HasModelsList,
|
||||
HasModuleR9MFlex,
|
||||
HasModuleR9MMini,
|
||||
HasSportConnector,
|
||||
HasTopLcd,
|
||||
HasVario,
|
||||
HasVarioSink,
|
||||
Heli,
|
||||
InputsLength,
|
||||
KeyShortcuts,
|
||||
LogicalSwitches,
|
||||
LuaInputsPerScript,
|
||||
LuaOutputsPerScript,
|
||||
LuaScripts,
|
||||
MavlinkTelemetry,
|
||||
Mixes,
|
||||
ModelImageFilters,
|
||||
ModelImageKeepExtn,
|
||||
ModelImageNameLen,
|
||||
ModelName,
|
||||
Models,
|
||||
ModelTrainerEnable,
|
||||
NumCurvePoints,
|
||||
NumCurves,
|
||||
NumFirstUsableModule,
|
||||
NumModules,
|
||||
OffsetWeight,
|
||||
Outputs,
|
||||
PPMCenter,
|
||||
PPMFrameLength,
|
||||
QMFavourites,
|
||||
SafetyChannelCustomFunction,
|
||||
Sensors,
|
||||
SlowRange,
|
||||
SlowScale,
|
||||
TelemetryCustomScreens,
|
||||
TelemetryCustomScreensBars,
|
||||
TelemetryCustomScreensFieldsPerLine,
|
||||
TelemetryCustomScreensLines,
|
||||
Timers,
|
||||
TimersName,
|
||||
TopBarZones,
|
||||
TrainerInputs,
|
||||
TrimsRange,
|
||||
VirtualInputs,
|
||||
VoicesMaxLength,
|
||||
};
|
||||
|
||||
float ValToTim(int value);
|
||||
|
||||
@@ -426,7 +426,8 @@ void GeneralSettings::convert(RadioDataConversionState & cstate)
|
||||
}
|
||||
|
||||
if (IS_TARANIS(cstate.toType)) {
|
||||
contrast = qBound<int>(getCurrentFirmware()->getCapability(MinContrast), contrast, getCurrentFirmware()->getCapability(MaxContrast));
|
||||
contrast = qBound<int>(Boards::getCapability(cstate.toType, Board::MinContrast),
|
||||
contrast, Boards::getCapability(cstate.toType, Board::MaxContrast));
|
||||
}
|
||||
|
||||
// TODO: Would be nice at this point to have GUI pause and ask the user to set up any custom hardware they have on the destination radio.
|
||||
|
||||
@@ -302,7 +302,6 @@ class GeneralSettings {
|
||||
unsigned int contrast;
|
||||
unsigned int vBatWarn;
|
||||
int txVoltageCalibration;
|
||||
int txCurrentCalibration;
|
||||
int vBatMin;
|
||||
int vBatMax;
|
||||
int backlightMode;
|
||||
@@ -326,7 +325,6 @@ class GeneralSettings {
|
||||
int timezone;
|
||||
int timezoneMinutes;
|
||||
bool adjustRTC;
|
||||
bool optrexDisplay;
|
||||
unsigned int inactivityTimer;
|
||||
unsigned int internalModuleBaudrate;
|
||||
bool minuteBeep;
|
||||
@@ -342,7 +340,6 @@ class GeneralSettings {
|
||||
unsigned int stickReverse;
|
||||
unsigned int speakerPitch;
|
||||
int hapticStrength;
|
||||
unsigned int speakerMode;
|
||||
char ownerName[OWNER_NAME_LEN + 1];
|
||||
int beeperLength;
|
||||
unsigned int gpsFormat;
|
||||
|
||||
@@ -55,7 +55,6 @@ class MixData {
|
||||
unsigned int speedUp;
|
||||
unsigned int speedDown;
|
||||
int carryTrim;
|
||||
bool noExpo;
|
||||
MltpxValue mltpx;
|
||||
unsigned int mixWarn;
|
||||
unsigned int flightModes; // -5=!FP4, 0=normal, 5=FP4
|
||||
|
||||
@@ -936,37 +936,36 @@ int ModelData::updateReference()
|
||||
//s1.report("Heli");
|
||||
}
|
||||
|
||||
if (fw->getCapability(Telemetry)) {
|
||||
updateTelemetryRef(frsky.voltsSource);
|
||||
updateTelemetryRef(frsky.altitudeSource);
|
||||
updateTelemetryRef(frsky.currentSource);
|
||||
updateTelemetryRef(frsky.varioSource);
|
||||
for (int i = 0; i < fw->getCapability(TelemetryCustomScreens); i++) {
|
||||
switch(frsky.screens[i].type) {
|
||||
case TELEMETRY_SCREEN_BARS:
|
||||
for (int j = 0; j < fw->getCapability(TelemetryCustomScreensBars); j++) {
|
||||
FrSkyBarData *fbd = &frsky.screens[i].body.bars[j];
|
||||
updateSourceRef(fbd->source);
|
||||
if (!fbd->source.isSet()) {
|
||||
fbd->barMin = 0;
|
||||
fbd->barMax = 0;
|
||||
}
|
||||
updateTelemetryRef(frsky.voltsSource);
|
||||
updateTelemetryRef(frsky.altitudeSource);
|
||||
updateTelemetryRef(frsky.currentSource);
|
||||
updateTelemetryRef(frsky.varioSource);
|
||||
|
||||
for (int i = 0; i < fw->getCapability(TelemetryCustomScreens); i++) {
|
||||
switch(frsky.screens[i].type) {
|
||||
case TELEMETRY_SCREEN_BARS:
|
||||
for (int j = 0; j < fw->getCapability(TelemetryCustomScreensBars); j++) {
|
||||
FrSkyBarData *fbd = &frsky.screens[i].body.bars[j];
|
||||
updateSourceRef(fbd->source);
|
||||
if (!fbd->source.isSet()) {
|
||||
fbd->barMin = 0;
|
||||
fbd->barMax = 0;
|
||||
}
|
||||
break;
|
||||
case TELEMETRY_SCREEN_NUMBERS:
|
||||
for (int j = 0; j < fw->getCapability(TelemetryCustomScreensLines); j++) {
|
||||
FrSkyLineData *fld = &frsky.screens[i].body.lines[j];
|
||||
for (int k = 0; k < fw->getCapability(TelemetryCustomScreensFieldsPerLine); k++) {
|
||||
updateSourceRef(fld->source[k]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TELEMETRY_SCREEN_NUMBERS:
|
||||
for (int j = 0; j < fw->getCapability(TelemetryCustomScreensLines); j++) {
|
||||
FrSkyLineData *fld = &frsky.screens[i].body.lines[j];
|
||||
for (int k = 0; k < fw->getCapability(TelemetryCustomScreensFieldsPerLine); k++) {
|
||||
updateSourceRef(fld->source[k]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//s1.report("Telemetry");
|
||||
}
|
||||
//s1.report("Telemetry");
|
||||
|
||||
for (int i = 0; i < CPN_MAX_SENSORS; i++) {
|
||||
SensorData *sd = &sensorData[i];
|
||||
|
||||
@@ -55,291 +55,37 @@ Firmware * OpenTxFirmware::getFirmwareVariant(const QString &id)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO centralise those related to data sizes so common to struct and capability
|
||||
// current method is too risky
|
||||
int OpenTxFirmware::getCapability(::Capability capability)
|
||||
{
|
||||
switch (capability) {
|
||||
case Models:
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else
|
||||
return 60;
|
||||
case Imperial:
|
||||
return 0;
|
||||
case HasModelImage:
|
||||
return (board == BOARD_TARANIS_X9D || IS_TARANIS_PLUS(board) || board == BOARD_TARANIS_X9DP_2019 || IS_FAMILY_HORUS_OR_T16(board));
|
||||
case ModelImageNameLen:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) ? 14 : 10); // including extension if saved and <= CPN_MAX_BITMAP_LEN
|
||||
case ModelImageKeepExtn:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) ? true : false);
|
||||
case HasBeeper:
|
||||
return false;
|
||||
case HasPxxCountry:
|
||||
return 1;
|
||||
case HasGeneralUnits:
|
||||
return true;
|
||||
case HasNegAndSwitches:
|
||||
return true;
|
||||
case PPMExtCtrl:
|
||||
return 1;
|
||||
case PPMFrameLength:
|
||||
return 40;
|
||||
case FlightModes:
|
||||
return 9;
|
||||
case FlightModesHaveFades:
|
||||
return 1;
|
||||
case Heli:
|
||||
if (Boards::getCapability(board, Board::Surface))
|
||||
return false;
|
||||
else if (IS_HORUS_OR_TARANIS(board))
|
||||
return id.contains("noheli") ? 0 : 1;
|
||||
else
|
||||
return id.contains("heli") ? 1 : 0;
|
||||
case Gvars:
|
||||
if (IS_STM32H7(board) || IS_STM32H5(board))
|
||||
return id.contains("nogvars") ? 0 : 15;
|
||||
else if (IS_HORUS_OR_TARANIS(board))
|
||||
return id.contains("nogvars") ? 0 : 9;
|
||||
else if (id.contains("gvars"))
|
||||
return 9;
|
||||
else
|
||||
return 0;
|
||||
case ModelName:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) ? 15 : (HAS_LARGE_LCD(board) ? 12 : 10));
|
||||
case FlightModesName:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? 10 : 6);
|
||||
case GvarsName:
|
||||
return 3;
|
||||
case GvarsInCS:
|
||||
case HasFAIMode:
|
||||
return 1;
|
||||
case GvarsAreNamed:
|
||||
case GvarsFlightModes:
|
||||
return 1;
|
||||
case Mixes:
|
||||
return 64;
|
||||
case OffsetWeight:
|
||||
return 500;
|
||||
case Timers:
|
||||
return 3;
|
||||
case TimersName:
|
||||
if (HAS_LARGE_LCD(board))
|
||||
return 8;
|
||||
else
|
||||
return 3;
|
||||
case PermTimers:
|
||||
return true;
|
||||
case CustomFunctions:
|
||||
return 64;
|
||||
case SafetyChannelCustomFunction:
|
||||
return id.contains("nooverridech") ? 0 : 1;
|
||||
case LogicalSwitches:
|
||||
return 64;
|
||||
case CustomAndSwitches:
|
||||
return getCapability(LogicalSwitches);
|
||||
case LogicalSwitchesExt:
|
||||
return true;
|
||||
case Outputs:
|
||||
return 32;
|
||||
case NumCurvePoints:
|
||||
return 512;
|
||||
case VoicesAsNumbers:
|
||||
return 0;
|
||||
case VoicesMaxLength:
|
||||
return 8;
|
||||
case MultiLangVoice:
|
||||
return 1;
|
||||
case SoundPitch:
|
||||
return 1;
|
||||
case Haptic:
|
||||
return board != Board::BOARD_TARANIS_X9D || id.contains("haptic");
|
||||
case ModelTrainerEnable:
|
||||
if (IS_HORUS_OR_TARANIS(board) && board!=Board::BOARD_TARANIS_XLITE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case MaxVolume:
|
||||
return 23;
|
||||
case MaxContrast:
|
||||
if (IS_TARANIS_SMALL(board))
|
||||
return 30;
|
||||
else
|
||||
return 45;
|
||||
case MinContrast:
|
||||
if (IS_TARANIS_X9(board))
|
||||
return 0;
|
||||
else
|
||||
return 10;
|
||||
case HasSoundMixer:
|
||||
return 1;
|
||||
case ExtraInputs:
|
||||
return 1;
|
||||
case TrimsRange:
|
||||
return 128;
|
||||
case ExtendedTrimsRange:
|
||||
return 512;
|
||||
case Simulation:
|
||||
return 1;
|
||||
case NumCurves:
|
||||
return 32;
|
||||
case HasMixerNames:
|
||||
return (IS_TARANIS_X9(board) ? 8 : 6);
|
||||
case HasExpoNames:
|
||||
return (IS_TARANIS_X9(board) ? 8 : 6);
|
||||
case HasNoExpo:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? false : true);
|
||||
case ChannelsName:
|
||||
return (HAS_LARGE_LCD(board) ? 6 : 4);
|
||||
case HasCvNames:
|
||||
return 1;
|
||||
case Telemetry:
|
||||
return 1;
|
||||
case TelemetryBars:
|
||||
return 1;
|
||||
case TelemetryCustomScreens:
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else
|
||||
return 4;
|
||||
case TelemetryCustomScreensBars:
|
||||
return (getCapability(TelemetryCustomScreens) ? 4 : 0);
|
||||
case TelemetryCustomScreensLines:
|
||||
return (getCapability(TelemetryCustomScreens) ? 4 : 0);
|
||||
case TelemetryCustomScreensFieldsPerLine:
|
||||
return HAS_LARGE_LCD(board) ? 3 : 2;
|
||||
case NoTelemetryProtocol:
|
||||
return IS_HORUS_OR_TARANIS(board) ? 1 : 0;
|
||||
case TelemetryUnits:
|
||||
return 0;
|
||||
case TelemetryMaxMultiplier:
|
||||
return 32;
|
||||
case PPMCenter:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? 500 : (id.contains("ppmca") ? 125 : 0));
|
||||
case SYMLimits:
|
||||
return 1;
|
||||
case HasVario:
|
||||
return Boards::isAir(board);
|
||||
case HasVarioSink:
|
||||
return Boards::isAir(board);
|
||||
case HasFailsafe:
|
||||
return 32;
|
||||
case NumModules:
|
||||
return 2;
|
||||
case NumFirstUsableModule:
|
||||
return (IS_JUMPER_T12(board) && !id.contains("internalmulti") ? 1 : 0);
|
||||
case HasModuleR9MFlex:
|
||||
return id.contains("flexr9m");
|
||||
case HasModuleR9MMini:
|
||||
return IS_TARANIS_XLITE(board) && !id.contains("stdr9m");
|
||||
case HasPPMStart:
|
||||
return true;
|
||||
case HasVolume:
|
||||
return true;
|
||||
case HasBrightness:
|
||||
return true;
|
||||
case PerModelTimers:
|
||||
return 1;
|
||||
case SlowScale:
|
||||
return 10;
|
||||
case SlowRange:
|
||||
return 250;
|
||||
case CSFunc:
|
||||
return 18;
|
||||
case HasSDLogs:
|
||||
return true;
|
||||
case GetThrSwitch:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? SWITCH_SF1 : SWITCH_THR);
|
||||
case HasDisplayText:
|
||||
return 1;
|
||||
case HasTopLcd:
|
||||
return IS_TARANIS_X9E(board) ? 1 : 0;
|
||||
case GlobalFunctions:
|
||||
return 64;
|
||||
case VirtualInputs:
|
||||
return 32;
|
||||
case InputsLength:
|
||||
return HAS_LARGE_LCD(board) ? 4 : 3;
|
||||
case TrainerInputs:
|
||||
return 16;
|
||||
case LuaScripts:
|
||||
return IS_HORUS_OR_TARANIS(board) && id.contains("lua") ? 7 : 0;
|
||||
case LuaInputsPerScript:
|
||||
return IS_HORUS_OR_TARANIS(board) ? 10 : 0;
|
||||
case LuaOutputsPerScript:
|
||||
return IS_HORUS_OR_TARANIS(board) ? 6 : 0;
|
||||
case LimitsPer1000:
|
||||
case EnhancedCurves:
|
||||
return 1;
|
||||
case HasFasOffset:
|
||||
return true;
|
||||
case HasMahPersistent:
|
||||
return true;
|
||||
case MavlinkTelemetry:
|
||||
return id.contains("mavlink") ? 1 : 0;
|
||||
case SportTelemetry:
|
||||
return 1;
|
||||
case HasInputDiff:
|
||||
case HasMixerExpo:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? true : false);
|
||||
case HasBatMeterRange:
|
||||
return (IS_HORUS_OR_TARANIS(board) ? true : id.contains("battgraph"));
|
||||
case CustomFunctions:
|
||||
return CPN_MAX_SPECIAL_FUNCTIONS;
|
||||
case DangerousFunctions:
|
||||
return id.contains("danger") ? 1 : 0;
|
||||
case HasModelLabels:
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case HasSwitchableJack:
|
||||
return IS_TARANIS_XLITES(board);
|
||||
case HasSportConnector:
|
||||
return IS_ACCESS_RADIO(board, id) || IS_TARANIS_X7(board) || IS_HORUS_X10(board) || IS_TARANIS_XLITE(board);
|
||||
case PwrButtonPress:
|
||||
return IS_HORUS_OR_TARANIS(board) && (board!=Board::BOARD_TARANIS_X9D) && (board!=Board::BOARD_TARANIS_X9DP);
|
||||
case Sensors:
|
||||
if (IS_STM32H7(board))
|
||||
return 99;
|
||||
else if (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X9(board))
|
||||
return 60;
|
||||
else
|
||||
return 40;
|
||||
case HasAuxSerialMode:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) && !(IS_FLYSKY_NV14(board) || IS_FLYSKY_EL18(board) || IS_FAMILY_PL18(board) || IS_FLYSKY_ST16(board))) ||
|
||||
(IS_TARANIS_X9(board) && !IS_TARANIS_X9DP_2019(board)) ||
|
||||
IS_RADIOMASTER_ZORRO(board) || IS_RADIOMASTER_TX12_MK2(board) || IS_RADIOMASTER_MT12(board);
|
||||
case HasAux2SerialMode:
|
||||
return IS_FAMILY_T16(board);
|
||||
case HasVCPSerialMode:
|
||||
return IS_FAMILY_HORUS_OR_T16(board) || IS_RADIOMASTER_ZORRO(board) ||
|
||||
IS_JUMPER_TPRO(board) || IS_RADIOMASTER_TX12_MK2(board) ||
|
||||
IS_RADIOMASTER_BOXER(board) || IS_RADIOMASTER_POCKET(board) ||
|
||||
IS_RADIOMASTER_MT12(board);
|
||||
case HasBluetooth:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) ||
|
||||
IS_TARANIS_X9DP_2019(board) || IS_FLYSKY_NV14(board) || IS_FLYSKY_EL18(board) || IS_FAMILY_PL18(board)) ? true : false;
|
||||
case HasADCJitterFilter:
|
||||
return IS_HORUS_OR_TARANIS(board);
|
||||
case HasTelemetryBaudrate:
|
||||
return IS_HORUS_OR_TARANIS(board);
|
||||
case TopBarZones:
|
||||
return Boards::getCapability(board, Board::LcdWidth) > Boards::getCapability(board, Board::LcdHeight) ? 4 : 2;
|
||||
case HasModelsList:
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case ExtendedTrimsRange:
|
||||
return 512;
|
||||
case FlightModes:
|
||||
return CPN_MAX_FLIGHT_MODES;
|
||||
case FlightModesName:
|
||||
return 10;
|
||||
case GlobalFunctions:
|
||||
return CPN_MAX_SPECIAL_FUNCTIONS;
|
||||
case Gvars:
|
||||
return id.contains("nogvars") ? 0 : (IS_STM32H7(board) || IS_STM32H5(board) ? CPN_MAX_GVARS : 9);
|
||||
case GvarsName:
|
||||
return 3;
|
||||
case Haptic: // TODO remove with X9D
|
||||
return board != Board::BOARD_TARANIS_X9D || id.contains("haptic");
|
||||
case HasExpoNames:
|
||||
return (IS_TARANIS_X9(board) ? 8 : 6);
|
||||
case HasFailsafe:
|
||||
return 32;
|
||||
case HasFlySkyGimbals:
|
||||
return (IS_RADIOMASTER_TX16S(board) && id.contains("flyskygimbals"));
|
||||
case RotaryEncoderNavigation:
|
||||
return (IS_TARANIS_X7(board) || IS_TARANIS_X9DP_2019(board) || IS_TARANIS_X9E(board) || IS_TARANIS_X9LITE(board) ||
|
||||
IS_JUMPER_T15(board) || IS_JUMPER_T18(board) || IS_JUMPER_T20(board) || IS_JUMPER_TPRO(board) ||
|
||||
IS_RADIOMASTER_BOXER(board) || IS_RADIOMASTER_GX12(board) || IS_RADIOMASTER_MT12(board) ||
|
||||
IS_RADIOMASTER_POCKET(board) || IS_RADIOMASTER_TX12(board) || IS_RADIOMASTER_TX12_MK2(board) ||
|
||||
IS_RADIOMASTER_TX16S(board) || IS_RADIOMASTER_ZORRO(board) || IS_RADIOMASTER_TX15(board) || IS_JUMPER_T15PRO(board) ||
|
||||
IS_FLYSKY_PA01(board) || IS_FLYSKY_ST16(board) ||
|
||||
IS_RADIOMASTER_TX16SMK3(board));
|
||||
case HasSoftwareSerialPower:
|
||||
return IS_RADIOMASTER_TX16S(board);
|
||||
case HasIntModuleMulti:
|
||||
return id.contains("internalmulti") || IS_RADIOMASTER_TX16S(board) || IS_JUMPER_T18(board) ||
|
||||
IS_RADIOMASTER_TX12(board) || IS_JUMPER_TLITE(board) || IS_BETAFPV_LR3PRO(board) ||
|
||||
(IS_RADIOMASTER_ZORRO(board) && !id.contains("internalelrs")) ||
|
||||
(IS_RADIOMASTER_BOXER(board) && !id.contains("internalelrs")) ||
|
||||
(IS_RADIOMASTER_POCKET(board) && !id.contains("internalelrs")) ||
|
||||
(IS_RADIOMASTER_MT12(board) && !id.contains("internalelrs"));
|
||||
case HasIntModuleCRSF:
|
||||
return id.contains("internalcrsf");
|
||||
case HasIntModuleELRS:
|
||||
@@ -350,18 +96,127 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
||||
case HasIntModuleFlySky:
|
||||
return id.contains("afhds2a") || id.contains("afhds3") ||
|
||||
IS_FLYSKY_NV14(board) || IS_FLYSKY_EL18(board) || IS_FAMILY_PL18(board);
|
||||
case BacklightLevelMin:
|
||||
if (IS_HORUS_X12S(board)) {
|
||||
return 5;
|
||||
} else if (IS_FAMILY_T16(board) || IS_FLYSKY_NV14(board) || IS_FLYSKY_EL18(board) || IS_FAMILY_PL18(board) || IS_FLYSKY_ST16(board)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 46;
|
||||
}
|
||||
case QMFavourites:
|
||||
return VERSION_MAJOR > 2 && Boards::getCapability(board, Board::HasColorLcd) ? MAX_QMFAVOURITES : 0;
|
||||
case HasIntModuleMulti:
|
||||
return id.contains("internalmulti") || IS_RADIOMASTER_TX16S(board) || IS_JUMPER_T18(board) ||
|
||||
IS_RADIOMASTER_TX12(board) || IS_JUMPER_TLITE(board) || IS_BETAFPV_LR3PRO(board) ||
|
||||
(IS_RADIOMASTER_ZORRO(board) && !id.contains("internalelrs")) ||
|
||||
(IS_RADIOMASTER_BOXER(board) && !id.contains("internalelrs")) ||
|
||||
(IS_RADIOMASTER_POCKET(board) && !id.contains("internalelrs")) ||
|
||||
(IS_RADIOMASTER_MT12(board) && !id.contains("internalelrs"));
|
||||
case HasMixerNames:
|
||||
return (IS_TARANIS_X9(board) ? 8 : 6);
|
||||
case HasModelImage:
|
||||
return (board == BOARD_TARANIS_X9D || IS_TARANIS_PLUS(board) || board == BOARD_TARANIS_X9DP_2019 || IS_FAMILY_HORUS_OR_T16(board));
|
||||
case HasModelLabels:
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case HasModelsList:
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case HasModuleR9MFlex:
|
||||
return id.contains("flexr9m");
|
||||
case HasModuleR9MMini:
|
||||
return IS_TARANIS_XLITE(board) && !id.contains("stdr9m");
|
||||
case HasSportConnector:
|
||||
return IS_ACCESS_RADIO(board, id) || IS_TARANIS_X7(board) || IS_HORUS_X10(board) || IS_TARANIS_XLITE(board);
|
||||
case HasTopLcd:
|
||||
return IS_TARANIS_X9E(board) ? 1 : 0;
|
||||
case HasVario:
|
||||
return Boards::isAir(board);
|
||||
case HasVarioSink:
|
||||
return Boards::isAir(board);
|
||||
case Heli:
|
||||
if (Boards::getCapability(board, Board::Surface))
|
||||
return false;
|
||||
else
|
||||
return !id.contains("noheli");
|
||||
case InputsLength:
|
||||
return HAS_LARGE_LCD(board) ? 4 : 3;
|
||||
case KeyShortcuts:
|
||||
return VERSION_MAJOR > 2 && Boards::getCapability(board, Board::HasColorLcd) ? MAX_KEYSHORTCUTS : 0;
|
||||
case LogicalSwitches:
|
||||
return CPN_MAX_LOGICAL_SWITCHES;
|
||||
case LuaInputsPerScript:
|
||||
return CPN_MAX_SCRIPT_INPUTS;
|
||||
case LuaOutputsPerScript:
|
||||
return CPN_MAX_SCRIPT_OUTPUTS;
|
||||
case LuaScripts:
|
||||
return id.contains("lua") ? CPN_MAX_SCRIPTS : 0;
|
||||
case MavlinkTelemetry:
|
||||
return id.contains("mavlink") ? 1 : 0;
|
||||
case Mixes:
|
||||
return CPN_MAX_MIXERS;
|
||||
case ModelImageKeepExtn:
|
||||
return IS_FAMILY_HORUS_OR_T16(board);
|
||||
case ModelImageNameLen:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) ? 14 : 10); // including extension if saved and <= CPN_MAX_BITMAP_LEN
|
||||
case ModelName:
|
||||
return (IS_FAMILY_HORUS_OR_T16(board) ? 15 : (HAS_LARGE_LCD(board) ? 12 : 10));
|
||||
case Models:
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else
|
||||
return CPN_MAX_MODELS;
|
||||
case ModelTrainerEnable:
|
||||
return board != Board::BOARD_TARANIS_XLITE;
|
||||
case NumCurvePoints:
|
||||
return 512; // Note: less than CPN_MAX_CURVES x CPN_MAX_POINTS
|
||||
case NumCurves:
|
||||
return CPN_MAX_CURVES;
|
||||
case NumFirstUsableModule:
|
||||
return (IS_JUMPER_T12(board) && !id.contains("internalmulti") ? 1 : 0);
|
||||
case NumModules:
|
||||
return CPN_MAX_MODULES;
|
||||
case OffsetWeight:
|
||||
return 500;
|
||||
case Outputs:
|
||||
return CPN_MAX_CHNOUT;
|
||||
case PPMCenter:
|
||||
return 500;
|
||||
case PPMFrameLength:
|
||||
return 40;
|
||||
case QMFavourites:
|
||||
return VERSION_MAJOR > 2 && Boards::getCapability(board, Board::HasColorLcd) ? MAX_QMFAVOURITES : 0;
|
||||
case SafetyChannelCustomFunction:
|
||||
return id.contains("nooverridech") ? 0 : 1;
|
||||
case Sensors:
|
||||
if (IS_STM32H7(board))
|
||||
return CPN_MAX_SENSORS;
|
||||
else if (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X9(board))
|
||||
return 60;
|
||||
else
|
||||
return 40;
|
||||
case SlowRange:
|
||||
return 250;
|
||||
case SlowScale:
|
||||
return 10;
|
||||
case TelemetryCustomScreens:
|
||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
return 0;
|
||||
else
|
||||
return 4;
|
||||
case TelemetryCustomScreensBars:
|
||||
return (getCapability(TelemetryCustomScreens) ? 4 : 0);
|
||||
case TelemetryCustomScreensFieldsPerLine:
|
||||
return HAS_LARGE_LCD(board) ? 3 : 2;
|
||||
case TelemetryCustomScreensLines:
|
||||
return (getCapability(TelemetryCustomScreens) ? 4 : 0);
|
||||
case Timers:
|
||||
return CPN_MAX_TIMERS;
|
||||
case TimersName:
|
||||
if (HAS_LARGE_LCD(board))
|
||||
return 8;
|
||||
else
|
||||
return 3;
|
||||
case TopBarZones:
|
||||
return Boards::getCapability(board, Board::LcdWidth) > Boards::getCapability(board, Board::LcdHeight) ? 4 : 2;
|
||||
case TrainerInputs:
|
||||
return 16;
|
||||
case TrimsRange:
|
||||
return 128;
|
||||
case VirtualInputs:
|
||||
return CPN_MAX_INPUTS;
|
||||
case VoicesMaxLength:
|
||||
return 8;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ class OpenTxFirmware: public Firmware
|
||||
|
||||
virtual QString getFirmwareUrl() override { return ""; } // depreciated;
|
||||
|
||||
virtual int getCapability(Capability) override;
|
||||
virtual int getCapability(::Capability) override;
|
||||
|
||||
virtual QString getCapabilityStr(Capability) override;
|
||||
virtual QString getCapabilityStr(::Capability) override;
|
||||
|
||||
virtual QString getAnalogInputName(unsigned int index) override
|
||||
{
|
||||
|
||||
@@ -110,13 +110,7 @@ ui(new Ui::GeneralSetup)
|
||||
ui->backlightswCB->setModel(panelFilteredModels->getItemModel(FIM_BACKLIGHTMODE));
|
||||
ui->backlightswCB->setCurrentIndex(ui->backlightswCB->findData(generalSettings.backlightMode));
|
||||
|
||||
if (!firmware->getCapability(MultiLangVoice)) {
|
||||
ui->VoiceLang_label->hide();
|
||||
ui->voiceLang_CB->hide();
|
||||
}
|
||||
else {
|
||||
populateVoiceLangCB(ui->voiceLang_CB, generalSettings.ttsLanguage);
|
||||
}
|
||||
populateVoiceLangCB(ui->voiceLang_CB, generalSettings.ttsLanguage);
|
||||
populateTextLangCB(ui->textLang_CB, generalSettings.uiLanguage, Boards::getCapability(board, Board::HasColorLcd));
|
||||
|
||||
if (!firmware->getCapability(MavlinkTelemetry)) {
|
||||
@@ -127,61 +121,19 @@ ui(new Ui::GeneralSetup)
|
||||
ui->mavbaud_CB->setCurrentIndex(generalSettings.mavbaud);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasSoundMixer)) {
|
||||
ui->beepVolume_SL->hide();
|
||||
ui->beepVolume_label->hide();
|
||||
ui->varioVolume_SL->hide();
|
||||
ui->varioVolume_label->hide();
|
||||
ui->bgVolume_SL->hide();
|
||||
ui->bgVolume_label->hide();
|
||||
ui->wavVolume_SL->hide();
|
||||
ui->wavVolume_label->hide();
|
||||
ui->varioP0_label->hide();
|
||||
ui->varioP0_SB->hide();
|
||||
ui->varioPMax_label->hide();
|
||||
ui->varioPMax_SB->hide();
|
||||
ui->varioR0_label->hide();
|
||||
ui->varioR0_SB->hide();
|
||||
}
|
||||
else {
|
||||
ui->beepVolume_SL->setValue(generalSettings.beepVolume);
|
||||
ui->varioVolume_SL->setValue(generalSettings.varioVolume);
|
||||
ui->bgVolume_SL->setValue(generalSettings.backgroundVolume);
|
||||
ui->wavVolume_SL->setValue(generalSettings.wavVolume);
|
||||
ui->varioP0_SB->setValue(700 + (generalSettings.varioPitch * 10));
|
||||
updateVarioPitchRange();
|
||||
ui->varioPMax_SB->setValue(700 + (generalSettings.varioPitch * 10) + 1000 + (generalSettings.varioRange * 10));
|
||||
ui->varioR0_SB->setValue(500 + (generalSettings.varioRepeat * 10));
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasFAIMode)) {
|
||||
ui->faimode_CB->hide();
|
||||
ui->label_faimode->hide();
|
||||
}
|
||||
else {
|
||||
ui->faimode_CB->setChecked(generalSettings.fai);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasPxxCountry)) {
|
||||
ui->countrycode_label->hide();
|
||||
ui->countrycode_CB->hide();
|
||||
}
|
||||
else {
|
||||
ui->countrycode_CB->setCurrentIndex(generalSettings.countryCode);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasGeneralUnits)) {
|
||||
ui->units_label->hide();
|
||||
ui->units_CB->hide();
|
||||
}
|
||||
else {
|
||||
ui->units_CB->setCurrentIndex(generalSettings.imperial);
|
||||
}
|
||||
|
||||
ui->beepVolume_SL->setValue(generalSettings.beepVolume);
|
||||
ui->varioVolume_SL->setValue(generalSettings.varioVolume);
|
||||
ui->bgVolume_SL->setValue(generalSettings.backgroundVolume);
|
||||
ui->wavVolume_SL->setValue(generalSettings.wavVolume);
|
||||
ui->varioP0_SB->setValue(700 + (generalSettings.varioPitch * 10));
|
||||
updateVarioPitchRange();
|
||||
ui->varioPMax_SB->setValue(700 + (generalSettings.varioPitch * 10) + 1000 + (generalSettings.varioRange * 10));
|
||||
ui->varioR0_SB->setValue(500 + (generalSettings.varioRepeat * 10));
|
||||
ui->faimode_CB->setChecked(generalSettings.fai);
|
||||
ui->countrycode_CB->setCurrentIndex(generalSettings.countryCode);
|
||||
ui->units_CB->setCurrentIndex(generalSettings.imperial);
|
||||
ui->ppm_units_CB->setCurrentIndex(generalSettings.ppmunit);
|
||||
|
||||
ui->gpsFormatCB->setCurrentIndex(generalSettings.gpsFormat);
|
||||
|
||||
ui->timezoneLE->setTime((generalSettings.timezone * 3600) + (generalSettings.timezoneMinutes/*quarter hours*/ * 15 * 60));
|
||||
|
||||
if (IS_HORUS_OR_TARANIS(board)) {
|
||||
@@ -208,7 +160,7 @@ ui(new Ui::GeneralSetup)
|
||||
ui->hatsModeCB->hide();
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HasSwitchableJack)) {
|
||||
if (Boards::getCapability(board, Board::HasSwitchableJack)) {
|
||||
ui->jackModeCB->setCurrentIndex(generalSettings.jackMode);
|
||||
}
|
||||
else {
|
||||
@@ -216,29 +168,7 @@ ui(new Ui::GeneralSetup)
|
||||
ui->jackModeCB->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(OptrexDisplay)) {
|
||||
ui->label_displayType->hide();
|
||||
ui->displayTypeCB->setDisabled(true);
|
||||
ui->displayTypeCB->hide();
|
||||
}
|
||||
else {
|
||||
ui->displayTypeCB->setCurrentIndex(generalSettings.optrexDisplay);
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasVolume)) {
|
||||
ui->volume_SL->hide();
|
||||
ui->volume_SL->setDisabled(true);
|
||||
ui->label_volume->hide();
|
||||
}
|
||||
else {
|
||||
ui->volume_SL->setMaximum(firmware->getCapability(MaxVolume));
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasBrightness)) {
|
||||
ui->BLBright_SB->hide();
|
||||
ui->BLBright_SB->setDisabled(true);
|
||||
ui->label_BLBright->hide();
|
||||
}
|
||||
ui->volume_SL->setMaximum(Boards::getCapability(board, Board::MaxVolume));
|
||||
|
||||
if (!IS_FAMILY_HORUS_OR_T16(board)) {
|
||||
ui->OFFBright_SB->hide();
|
||||
@@ -252,18 +182,6 @@ ui(new Ui::GeneralSetup)
|
||||
ui->label_KeysBl->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(SoundMod)) {
|
||||
ui->soundModeCB->setDisabled(true);
|
||||
ui->label_soundMode->hide();
|
||||
ui->soundModeCB->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(SoundPitch)) {
|
||||
ui->speakerPitchSB->setDisabled(true);
|
||||
ui->label_speakerPitch->hide();
|
||||
ui->speakerPitchSB->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(Haptic)) {
|
||||
ui->hapticStrength->setDisabled(true);
|
||||
ui->hapticmodeCB->setDisabled(true);
|
||||
@@ -273,8 +191,8 @@ ui(new Ui::GeneralSetup)
|
||||
ui->backlightautoSB->setMinimum(5);
|
||||
}
|
||||
|
||||
ui->contrastSB->setMinimum(firmware->getCapability(MinContrast));
|
||||
ui->contrastSB->setMaximum(firmware->getCapability(MaxContrast));
|
||||
ui->contrastSB->setMinimum(Boards::getCapability(board, Board::MinContrast));
|
||||
ui->contrastSB->setMaximum(Boards::getCapability(board, Board::MaxContrast));
|
||||
ui->contrastSB->setValue(generalSettings.contrast);
|
||||
|
||||
ui->battwarningDSB->setValue((double)generalSettings.vBatWarn / 10);
|
||||
@@ -292,7 +210,7 @@ ui(new Ui::GeneralSetup)
|
||||
ui->splashScreenDuration->setItemText(0, QCoreApplication::translate("GeneralSetup", "1s", nullptr));
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(PwrButtonPress)) {
|
||||
if (!Boards::getCapability(board, Board::PwrButtonPress)) {
|
||||
ui->pwrOnDelayLabel->hide();
|
||||
ui->pwrOnDelay->hide();
|
||||
ui->pwrOffDelayLabel->hide();
|
||||
@@ -352,14 +270,6 @@ ui(new Ui::GeneralSetup)
|
||||
ui->switchesDelay->setValue(10 * (generalSettings.switchesDelay + 15));
|
||||
ui->blAlarm_ChkB->setChecked(generalSettings.alarmsFlash);
|
||||
|
||||
if (!firmware->getCapability(HasBatMeterRange)) {
|
||||
ui->batMeterRangeLabel->hide();
|
||||
ui->HasBatMeterMinRangeLabel->hide();
|
||||
ui->HasBatMeterMaxRangeLabel->hide();
|
||||
ui->vBatMinDSB->hide();
|
||||
ui->vBatMaxDSB->hide();
|
||||
}
|
||||
|
||||
if (Boards::getCapability(board, Board::Surface)) {
|
||||
ui->stickModeLabel->hide();
|
||||
ui->stickmodeCB->hide();
|
||||
@@ -620,33 +530,25 @@ void GeneralSetupPanel::setValues()
|
||||
ui->label_HL->hide();
|
||||
ui->hapticLengthCB->hide();
|
||||
}
|
||||
ui->OFFBright_SB->setMinimum(firmware->getCapability(BacklightLevelMin));
|
||||
ui->OFFBright_SB->setMinimum(Boards::getCapability(board, Board::BacklightLevelMin));
|
||||
if (generalSettings.backlightOffBright > 100 - generalSettings.backlightBright)
|
||||
generalSettings.backlightOffBright = 100 - generalSettings.backlightBright;
|
||||
ui->BLBright_SB->setValue(100 - generalSettings.backlightBright);
|
||||
ui->OFFBright_SB->setValue(generalSettings.backlightOffBright);
|
||||
ui->BLBright_SB->setMinimum(ui->OFFBright_SB->value());
|
||||
ui->OFFBright_SB->setMaximum(ui->BLBright_SB->value());
|
||||
ui->soundModeCB->setCurrentIndex(generalSettings.speakerMode);
|
||||
ui->volume_SL->setValue(generalSettings.speakerVolume + 12);
|
||||
ui->beeperlenCB->setCurrentIndex(generalSettings.beeperLength + 2);
|
||||
ui->speakerPitchSB->setValue(generalSettings.speakerPitch);
|
||||
ui->hapticStrength->setValue(generalSettings.hapticStrength);
|
||||
ui->hapticmodeCB->setCurrentIndex(generalSettings.hapticMode + 2);
|
||||
|
||||
if (firmware->getCapability(HasBatMeterRange)) {
|
||||
ui->vBatMinDSB->setValue((double)(generalSettings.vBatMin + 90) / 10);
|
||||
ui->vBatMaxDSB->setValue((double)(generalSettings.vBatMax + 120) / 10);
|
||||
}
|
||||
|
||||
ui->vBatMinDSB->setValue((double)(generalSettings.vBatMin + 90) / 10);
|
||||
ui->vBatMaxDSB->setValue((double)(generalSettings.vBatMax + 120) / 10);
|
||||
ui->pwrOnDelay->setCurrentIndex(pwrDelayFromYaml(generalSettings.pwrOnSpeed));
|
||||
ui->pwrOffDelay->setCurrentIndex(pwrDelayFromYaml(generalSettings.pwrOffSpeed));
|
||||
ui->pwrOffIfInactiveSB->setValue(generalSettings.pwrOffIfInactive);
|
||||
|
||||
ui->registrationId->setText(generalSettings.registrationId);
|
||||
|
||||
ui->startSoundCB->setChecked(!generalSettings.dontPlayHello);
|
||||
|
||||
ui->modelQuickSelect_CB->setChecked(generalSettings.modelQuickSelect);
|
||||
|
||||
if (Boards::getCapability(board, Board::HasColorLcd)) {
|
||||
@@ -724,14 +626,6 @@ void GeneralSetupPanel::on_hapticStrength_valueChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_soundModeCB_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
generalSettings.speakerMode = index;
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_splashScreenDuration_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
@@ -1036,14 +930,6 @@ void GeneralSetupPanel::on_beeperCB_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_displayTypeCB_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
generalSettings.optrexDisplay = index;
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralSetupPanel::on_hapticmodeCB_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
@@ -1052,7 +938,6 @@ void GeneralSetupPanel::on_hapticmodeCB_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GeneralSetupPanel::on_channelorderCB_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
|
||||
@@ -44,7 +44,6 @@ class GeneralSetupPanel : public GeneralPanel
|
||||
void on_rssiPowerOffWarnChkB_stateChanged(int);
|
||||
void on_trainerPowerOffWarnChkB_stateChanged(int);
|
||||
void on_gpsFormatCB_currentIndexChanged(int index);
|
||||
void on_displayTypeCB_currentIndexChanged(int index);
|
||||
void on_BLBright_SB_editingFinished();
|
||||
void on_OFFBright_SB_editingFinished();
|
||||
void on_brightCtrl_CB_currentIndexChanged(int index);
|
||||
@@ -57,7 +56,6 @@ class GeneralSetupPanel : public GeneralPanel
|
||||
void on_timezoneLE_textEdited(const QString &text);
|
||||
void on_adjustRTC_stateChanged(int);
|
||||
void on_hapticStrength_valueChanged();
|
||||
void on_soundModeCB_currentIndexChanged(int index);
|
||||
void on_beeperlenCB_currentIndexChanged(int index);
|
||||
void on_volume_SL_valueChanged();
|
||||
void on_hapticmodeCB_currentIndexChanged(int index);
|
||||
|
||||
+1287
-1365
File diff suppressed because it is too large
Load Diff
@@ -192,13 +192,11 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
||||
addParams();
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HasADCJitterFilter)) {
|
||||
addLabel(tr("ADC Filter"));
|
||||
AutoCheckBox *filterEnable = new AutoCheckBox(this);
|
||||
filterEnable->setField(generalSettings.noJitterFilter, this, true);
|
||||
params->append(filterEnable);
|
||||
addParams();
|
||||
}
|
||||
addLabel(tr("ADC Filter"));
|
||||
AutoCheckBox *filterEnable = new AutoCheckBox(this);
|
||||
filterEnable->setField(generalSettings.noJitterFilter, this, true);
|
||||
params->append(filterEnable);
|
||||
addParams();
|
||||
|
||||
if (Boards::getCapability(board, Board::HasAudioMuteGPIO)) {
|
||||
addLabel(tr("Mute if no sound"));
|
||||
@@ -208,7 +206,7 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
||||
addParams();
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HasBluetooth)) {
|
||||
if (Boards::getCapability(board, Board::HasBluetooth)) {
|
||||
addLabel(tr("Bluetooth"));
|
||||
|
||||
AutoComboBox *bluetoothMode = new AutoComboBox(this);
|
||||
@@ -284,10 +282,12 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
||||
ExclusiveComboGroup *exclGroup = new ExclusiveComboGroup(
|
||||
this, [=](const QVariant &value) { return value == 0; });
|
||||
|
||||
if (firmware->getCapability(HasAuxSerialMode) || firmware->getCapability(HasAux2SerialMode) || firmware->getCapability(HasVCPSerialMode))
|
||||
if (Boards::getCapability(board, Board::HasAuxSerialMode) ||
|
||||
Boards::getCapability(board, Board::HasAux2SerialMode) ||
|
||||
Boards::getCapability(board, Board::HasVCPSerialMode))
|
||||
addSection(tr("Serial ports"));
|
||||
|
||||
if (firmware->getCapability(HasAuxSerialMode)) {
|
||||
if (Boards::getCapability(board, Board::HasAuxSerialMode)) {
|
||||
addLabel(tr("AUX1"));
|
||||
AutoComboBox *serialPortMode = new AutoComboBox(this);
|
||||
serialPortMode->setModel(tabFilteredModels->getItemModel(FIM_AUX1SERIALMODES));
|
||||
@@ -302,11 +302,11 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
||||
|
||||
addParams();
|
||||
|
||||
if (!firmware->getCapability(HasSoftwareSerialPower))
|
||||
if (!Boards::getCapability(board, Board::HasSoftwareSerialPower))
|
||||
serialPortPower->setVisible(false);
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HasAux2SerialMode)) {
|
||||
if (Boards::getCapability(board, Board::HasAux2SerialMode)) {
|
||||
addLabel(tr("AUX2"));
|
||||
AutoComboBox *serialPortMode = new AutoComboBox(this);
|
||||
serialPortMode->setModel(tabFilteredModels->getItemModel(FIM_AUX2SERIALMODES));
|
||||
@@ -321,11 +321,11 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
||||
|
||||
addParams();
|
||||
|
||||
if (!firmware->getCapability(HasSoftwareSerialPower))
|
||||
if (!Boards::getCapability(board, Board::HasSoftwareSerialPower))
|
||||
serialPortPower->setVisible(false);
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HasVCPSerialMode)) {
|
||||
if (Boards::getCapability(board, Board::HasVCPSerialMode)) {
|
||||
addLabel(tr("USB-VCP"));
|
||||
serialPortUSBVCP = new AutoComboBox(this);
|
||||
serialPortUSBVCP->setModel(tabFilteredModels->getItemModel(FIM_VCPSERIALMODES));
|
||||
@@ -345,16 +345,6 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
|
||||
addParams();
|
||||
}
|
||||
|
||||
if (firmware->getCapability(HastxCurrentCalibration)) {
|
||||
addLabel(tr("Current Offset"));
|
||||
AutoSpinBox *txCurrentCalibration = new AutoSpinBox(this);
|
||||
FieldRange txCCRng = GeneralSettings::getTxCurrentCalibration();
|
||||
txCurrentCalibration->setSuffix(txCCRng.unit);
|
||||
txCurrentCalibration->setField(generalSettings.txCurrentCalibration);
|
||||
params->append(txCurrentCalibration);
|
||||
addParams();
|
||||
}
|
||||
|
||||
if (Boards::getCapability(board, Board::LcdWidth) == 128) {
|
||||
addSection(tr("Screen"));
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ MainWindow::MainWindow():
|
||||
updateFactories(nullptr),
|
||||
windowsListActions(new QActionGroup(this))
|
||||
{
|
||||
//Boards::tests();
|
||||
|
||||
// setUnifiedTitleAndToolBarOnMac(true);
|
||||
this->setWindowIcon(QIcon(":/icon.png"));
|
||||
setAcceptDrops(true);
|
||||
|
||||
@@ -104,9 +104,7 @@ ChannelsPanel::ChannelsPanel(QWidget * parent, ModelData & model, GeneralSetting
|
||||
connectItemModelEvents(dialogFilteredItemModels->getItemModel(crvid));
|
||||
|
||||
int gvid = dialogFilteredItemModels->registerItemModel(new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_GVarRef)), "GVarRef");
|
||||
|
||||
curveRefFilteredItemModels = new CurveRefFilteredFactory(sharedItemModels,
|
||||
firmware->getCapability(HasMixerExpo) ? 0 : FilteredItemModel::PositiveFilter);
|
||||
curveRefFilteredItemModels = new CurveRefFilteredFactory(sharedItemModels, 0);
|
||||
|
||||
QStringList headerLabels;
|
||||
headerLabels << "#";
|
||||
@@ -118,8 +116,7 @@ ChannelsPanel::ChannelsPanel(QWidget * parent, ModelData & model, GeneralSetting
|
||||
headerLabels << tr("Curve") << tr("Plot");
|
||||
if (firmware->getCapability(PPMCenter))
|
||||
headerLabels << tr("PPM Center");
|
||||
if (firmware->getCapability(SYMLimits))
|
||||
headerLabels << tr("Linear Subtrim");
|
||||
headerLabels << tr("Linear Subtrim");
|
||||
TableLayout *tableLayout = new TableLayout(this, chnCapability, headerLabels);
|
||||
|
||||
for (int i = 0; i < chnCapability; i++) {
|
||||
@@ -192,13 +189,11 @@ ChannelsPanel::ChannelsPanel(QWidget * parent, ModelData & model, GeneralSetting
|
||||
}
|
||||
|
||||
// Symetrical limits
|
||||
if (firmware->getCapability(SYMLimits)) {
|
||||
symlimitsChk[i] = new QCheckBox(this);
|
||||
symlimitsChk[i]->setProperty("index", i);
|
||||
symlimitsChk[i]->setChecked(model.limitData[i].symetrical);
|
||||
connect(symlimitsChk[i], SIGNAL(toggled(bool)), this, SLOT(symlimitsEdited()));
|
||||
tableLayout->addWidget(i, col++, symlimitsChk[i]);
|
||||
}
|
||||
symlimitsChk[i] = new QCheckBox(this);
|
||||
symlimitsChk[i]->setProperty("index", i);
|
||||
symlimitsChk[i]->setChecked(model.limitData[i].symetrical);
|
||||
connect(symlimitsChk[i], SIGNAL(toggled(bool)), this, SLOT(symlimitsEdited()));
|
||||
tableLayout->addWidget(i, col++, symlimitsChk[i]);
|
||||
}
|
||||
|
||||
update();
|
||||
@@ -301,12 +296,12 @@ void ChannelsPanel::updateLine(int i)
|
||||
chnMin[i]->setValue(chn.min);
|
||||
chnMax[i]->setValue(chn.max);
|
||||
invCB[i]->setCurrentIndex((chn.revert) ? 1 : 0);
|
||||
|
||||
if (firmware->getCapability(PPMCenter)) {
|
||||
centerSB[i]->setValue(chn.ppmCenter + 1500);
|
||||
}
|
||||
if (firmware->getCapability(SYMLimits)) {
|
||||
symlimitsChk[i]->setChecked(chn.symetrical);
|
||||
}
|
||||
|
||||
symlimitsChk[i]->setChecked(chn.symetrical);
|
||||
lock = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,14 +75,12 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model,
|
||||
"RawSource GVars");
|
||||
connectItemModelEvents(tabFilterFactory->getItemModel(rawSourceGVarsId));
|
||||
|
||||
if (!firmware->getCapability(VoicesAsNumbers)) {
|
||||
tracksSet = getFilesSet(getSoundsPath(generalSettings), QStringList() << "*.wav" << "*.WAV", firmware->getCapability(VoicesMaxLength));
|
||||
for (int i = 0; i < fswCapability; i++) {
|
||||
if (functions[i].func == FuncPlayPrompt || functions[i].func == FuncBackgroundMusic) {
|
||||
QString temp = functions[i].paramarm;
|
||||
if (!temp.isEmpty()) {
|
||||
tracksSet.insert(temp);
|
||||
}
|
||||
tracksSet = getFilesSet(getSoundsPath(generalSettings), QStringList() << "*.wav" << "*.WAV", firmware->getCapability(VoicesMaxLength));
|
||||
for (int i = 0; i < fswCapability; i++) {
|
||||
if (functions[i].func == FuncPlayPrompt || functions[i].func == FuncBackgroundMusic) {
|
||||
QString temp = functions[i].paramarm;
|
||||
if (!temp.isEmpty()) {
|
||||
tracksSet.insert(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,15 +268,10 @@ bool CustomFunctionsPanel::playSound(int index)
|
||||
if (!QDir(path).exists())
|
||||
return false; // unlikely
|
||||
|
||||
if (firmware->getCapability(VoicesAsNumbers)) { // AVR
|
||||
path.append(QString("/%1.wav").arg(int(fswtchParam[index]->value()), 4, 10, QChar('0')));
|
||||
}
|
||||
else {
|
||||
QString lang(generalSettings.ttsLanguage);
|
||||
if (lang.isEmpty())
|
||||
lang = "en";
|
||||
path.append(QString("/SOUNDS/%1/%2.wav").arg(lang).arg(fswtchParamArmT[index]->currentText()));
|
||||
}
|
||||
QString lang(generalSettings.ttsLanguage);
|
||||
if (lang.isEmpty())
|
||||
lang = "en";
|
||||
path.append(QString("/SOUNDS/%1/%2.wav").arg(lang).arg(fswtchParamArmT[index]->currentText()));
|
||||
}
|
||||
|
||||
if (!QFileInfo::exists(path) || !QFileInfo(path).isReadable()) {
|
||||
@@ -488,7 +481,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool changed)
|
||||
populateFuncParamCB(fswtchParamT[i], func, cfn.param);
|
||||
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM;
|
||||
}
|
||||
else if (func == FuncPlaySound || func == FuncPlayHaptic || func == FuncPlayValue || func == FuncPlayPrompt || func == FuncPlayBoth || func == FuncBackgroundMusic || func == FuncSetScreen) {
|
||||
else if (func == FuncPlaySound || func == FuncPlayHaptic || func == FuncPlayValue || func == FuncPlayPrompt || func == FuncBackgroundMusic || func == FuncSetScreen) {
|
||||
if (func != FuncBackgroundMusic) {
|
||||
if (changed)
|
||||
cfn.repeatParam = fswtchRepeat[i]->currentData().toInt();
|
||||
@@ -502,49 +495,14 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool changed)
|
||||
populateFuncParamCB(fswtchParamT[i], func, cfn.param);
|
||||
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM | CUSTOM_FUNCTION_REPEAT;
|
||||
}
|
||||
else if (func == FuncPlayPrompt || func == FuncPlayBoth) {
|
||||
if (firmware->getCapability(VoicesAsNumbers)) {
|
||||
fswtchParam[i]->setDecimals(0);
|
||||
fswtchParam[i]->setSingleStep(1);
|
||||
fswtchParam[i]->setMinimum(0);
|
||||
if (func == FuncPlayPrompt) {
|
||||
widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM | CUSTOM_FUNCTION_REPEAT | CUSTOM_FUNCTION_GV_TOOGLE;
|
||||
}
|
||||
else {
|
||||
widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM | CUSTOM_FUNCTION_REPEAT;
|
||||
fswtchParamGV[i]->setChecked(false);
|
||||
}
|
||||
fswtchParam[i]->setMaximum(func == FuncPlayBoth ? 254 : 255);
|
||||
if (changed) {
|
||||
if (fswtchParamGV[i]->isChecked()) {
|
||||
fswtchParam[i]->setMinimum(1);
|
||||
cfn.param = std::min(fswtchParam[i]->value(), 5.0) + (fswtchParamGV[i]->isChecked() ? 250 : 0);
|
||||
}
|
||||
else {
|
||||
cfn.param = fswtchParam[i]->value();
|
||||
}
|
||||
}
|
||||
if (cfn.param > 250 && (func != FuncPlayBoth)) {
|
||||
fswtchParamGV[i]->setChecked(true);
|
||||
fswtchParam[i]->setValue(cfn.param - 250);
|
||||
fswtchParam[i]->setMaximum(5);
|
||||
}
|
||||
else {
|
||||
fswtchParamGV[i]->setChecked(false);
|
||||
fswtchParam[i]->setValue(cfn.param);
|
||||
}
|
||||
if (cfn.param < 251)
|
||||
widgetsMask |= CUSTOM_FUNCTION_PLAY;
|
||||
else if (func == FuncPlayPrompt) {
|
||||
widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM;
|
||||
if (changed) {
|
||||
Helpers::getFileComboBoxValue(fswtchParamArmT[i], cfn.paramarm, firmware->getCapability(VoicesMaxLength));
|
||||
}
|
||||
else {
|
||||
widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM;
|
||||
if (changed) {
|
||||
Helpers::getFileComboBoxValue(fswtchParamArmT[i], cfn.paramarm, firmware->getCapability(VoicesMaxLength));
|
||||
}
|
||||
Helpers::populateFileComboBox(fswtchParamArmT[i], tracksSet, cfn.paramarm);
|
||||
if (fswtchParamArmT[i]->currentText() != CPN_STR_NONE_ITEM) {
|
||||
widgetsMask |= CUSTOM_FUNCTION_PLAY;
|
||||
}
|
||||
Helpers::populateFileComboBox(fswtchParamArmT[i], tracksSet, cfn.paramarm);
|
||||
if (fswtchParamArmT[i]->currentText() != CPN_STR_NONE_ITEM) {
|
||||
widgetsMask |= CUSTOM_FUNCTION_PLAY;
|
||||
}
|
||||
}
|
||||
else if (func == FuncBackgroundMusic) {
|
||||
|
||||
@@ -67,8 +67,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
||||
|
||||
connect(offsetEditor, &SourceNumRefEditor::resized, this, [=] () { shrink(); });
|
||||
|
||||
curveRefFilteredItemModels = new CurveRefFilteredFactory(sharedItemModels,
|
||||
firmware->getCapability(HasInputDiff) ? 0 : FilteredItemModel::PositiveFilter);
|
||||
curveRefFilteredItemModels = new CurveRefFilteredFactory(sharedItemModels, 0);
|
||||
|
||||
curveGroup = new CurveReferenceUIManager(ui->cboCurveType, ui->chkCurveUseSource, ui->sbCurveValue, ui->cboCurveSource, ui->cboCurveFunc,
|
||||
ui->imgCurve, ed->curve, model, sharedItemModels, curveRefFilteredItemModels, esMdl, this);
|
||||
|
||||
@@ -62,23 +62,16 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
|
||||
ui->swtch->hide();
|
||||
}
|
||||
|
||||
// FadeIn / FadeOut
|
||||
if (firmware->getCapability(FlightModesHaveFades)) {
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
int range = firmware->getCapability(SlowRange);
|
||||
ui->fadeIn->setMaximum(float(range) / scale);
|
||||
ui->fadeIn->setSingleStep(1.0 / scale);
|
||||
ui->fadeIn->setDecimals((scale == 1 ? 0 :1) );
|
||||
connect(ui->fadeIn, SIGNAL(editingFinished()), this, SLOT(phaseFadeIn_editingFinished()));
|
||||
ui->fadeOut->setMaximum(float(range) / scale);
|
||||
ui->fadeOut->setSingleStep(1.0 / scale);
|
||||
ui->fadeOut->setDecimals((scale == 1 ? 0 :1));
|
||||
connect(ui->fadeOut, SIGNAL(editingFinished()), this, SLOT(phaseFadeOut_editingFinished()));
|
||||
}
|
||||
else {
|
||||
ui->fadeIn->setDisabled(true);
|
||||
ui->fadeOut->setDisabled(true);
|
||||
}
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
int range = firmware->getCapability(SlowRange);
|
||||
ui->fadeIn->setMaximum(float(range) / scale);
|
||||
ui->fadeIn->setSingleStep(1.0 / scale);
|
||||
ui->fadeIn->setDecimals((scale == 1 ? 0 :1) );
|
||||
connect(ui->fadeIn, SIGNAL(editingFinished()), this, SLOT(phaseFadeIn_editingFinished()));
|
||||
ui->fadeOut->setMaximum(float(range) / scale);
|
||||
ui->fadeOut->setSingleStep(1.0 / scale);
|
||||
ui->fadeOut->setDecimals((scale == 1 ? 0 :1));
|
||||
connect(ui->fadeOut, SIGNAL(editingFinished()), this, SLOT(phaseFadeOut_editingFinished()));
|
||||
|
||||
// The trims
|
||||
QString labels[CPN_MAX_TRIMS];
|
||||
|
||||
@@ -36,8 +36,7 @@ LogicalSwitchesPanel::LogicalSwitchesPanel(QWidget * parent, ModelData & model,
|
||||
RawSwitch::LogicalSwitchesContext);
|
||||
connectItemModelEvents(rawSwitchFilteredModel);
|
||||
|
||||
const int srcGroups = firmware->getCapability(GvarsInCS) ? 0 : (RawSource::AllSourceGroups & ~RawSource::GVarsGroup);
|
||||
rawSourceFilteredModel = new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_RawSource), srcGroups);
|
||||
rawSourceFilteredModel = new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_RawSource));
|
||||
connectItemModelEvents(rawSourceFilteredModel);
|
||||
|
||||
lsCapability = firmware->getCapability(LogicalSwitches);
|
||||
|
||||
@@ -79,21 +79,13 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData * mixdata,
|
||||
|
||||
connect(offsetEditor, &SourceNumRefEditor::resized, this, [=] () { shrink(); });
|
||||
|
||||
curveRefFilteredItemModels = new CurveRefFilteredFactory(sharedItemModels,
|
||||
firmware->getCapability(HasMixerExpo) ? 0 : FilteredItemModel::PositiveFilter);
|
||||
curveRefFilteredItemModels = new CurveRefFilteredFactory(sharedItemModels, 0);
|
||||
|
||||
curveGroup = new CurveReferenceUIManager(ui->cboCurveType, ui->chkCurveUseSource, ui->sbCurveValue, ui->cboCurveSource, ui->cboCurveFunc,
|
||||
ui->imgCurve, md->curve, model, sharedItemModels, curveRefFilteredItemModels, esMdl, this);
|
||||
|
||||
connect(curveGroup, &CurveReferenceUIManager::resized, this, [=] () { shrink(); });
|
||||
|
||||
ui->MixDR_CB->setChecked(md->noExpo == 0);
|
||||
|
||||
if (!firmware->getCapability(HasNoExpo)) {
|
||||
ui->MixDR_CB->hide();
|
||||
ui->label_MixDR->hide();
|
||||
}
|
||||
|
||||
if (index == 0 || model.mixData[index - 1].destCh != mixdata->destCh) {
|
||||
ui->mltpxCB->hide();
|
||||
ui->mltpxLbl->hide();
|
||||
@@ -182,7 +174,6 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData * mixdata,
|
||||
connect(ui->mixerName, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
|
||||
connect(ui->sourceCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
|
||||
connect(ui->trimCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
|
||||
connect(ui->MixDR_CB, SIGNAL(toggled(bool)), this, SLOT(valuesChanged()));
|
||||
connect(ui->switchesCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
|
||||
connect(ui->warningCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
|
||||
connect(ui->mltpxCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
|
||||
@@ -227,13 +218,7 @@ void MixerDialog::valuesChanged()
|
||||
if (!lock) {
|
||||
lock = true;
|
||||
md->srcRaw = RawSource(ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt());
|
||||
if (firmware->getCapability(HasNoExpo)) {
|
||||
bool drVisible = (md->srcRaw.type == SOURCE_TYPE_INPUT && md->srcRaw.index < CPN_MAX_STICKS);
|
||||
ui->MixDR_CB->setEnabled(drVisible);
|
||||
ui->label_MixDR->setEnabled(drVisible);
|
||||
}
|
||||
md->carryTrim = -(ui->trimCB->currentIndex() - 1);
|
||||
md->noExpo = ui->MixDR_CB->checkState() ? 0 : 1;
|
||||
md->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt());
|
||||
md->mixWarn = ui->warningCB->currentIndex();
|
||||
md->mltpx = (MltpxValue)ui->mltpxCB->currentIndex();
|
||||
|
||||
@@ -29,6 +29,288 @@
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Offset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QComboBox" name="switchesCB"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="mixerName"/>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QComboBox" name="warningCB">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OFF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 Beep</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2 Beeps</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3 Beeps</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="cboCurveType">
|
||||
<property name="whatsThis">
|
||||
<string>The curve used by the mix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_name">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="mltpxLbl">
|
||||
<property name="text">
|
||||
<string>Multiplex</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Warning</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Switch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_curve">
|
||||
<property name="text">
|
||||
<string>Curve</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QComboBox" name="mltpxCB">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ADD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>MULTIPLY</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>REPLACE</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="trimCB">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>No</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Yes</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="lb_FP4">
|
||||
<property name="text">
|
||||
<string notr="true">4</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lb_FP3">
|
||||
<property name="text">
|
||||
<string notr="true">3</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLabel" name="lb_FP7">
|
||||
<property name="text">
|
||||
<string notr="true">7</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cb_FP0">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="lb_FP2">
|
||||
<property name="text">
|
||||
<string notr="true">2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QCheckBox" name="cb_FP6">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="8">
|
||||
<widget class="QCheckBox" name="cb_FP8">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QLabel" name="lb_FP8">
|
||||
<property name="text">
|
||||
<string notr="true">8</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<widget class="QCheckBox" name="cb_FP7">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="cb_FP1">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QCheckBox" name="cb_FP5">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lb_FP1">
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lb_FP0">
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lb_FP6">
|
||||
<property name="text">
|
||||
<string notr="true">6</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="cb_FP2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="lb_FP5">
|
||||
<property name="text">
|
||||
<string notr="true">5</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QCheckBox" name="cb_FP4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="cb_FP3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="9">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,1">
|
||||
<item>
|
||||
@@ -51,7 +333,7 @@
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@@ -63,9 +345,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="sourceCB"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="trimLabel">
|
||||
<property name="text">
|
||||
@@ -73,146 +352,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QComboBox" name="switchesCB"/>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,1">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkOffsetUseSource">
|
||||
<property name="text">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cboOffsetSource">
|
||||
<property name="whatsThis">
|
||||
<string>The source for the mixer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbOffsetValue"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Warning</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Weight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Switch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QComboBox" name="mltpxCB">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ADD</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>MULTIPLY</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>REPLACE</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_MixDR">
|
||||
<widget class="QLabel" name="label_phases">
|
||||
<property name="text">
|
||||
<string>Include DR/Expo</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="mltpxLbl">
|
||||
<property name="text">
|
||||
<string>Multiplex</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_curve">
|
||||
<property name="text">
|
||||
<string>Curve</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="mixerName"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="trimCB">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>No</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Yes</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="cboCurveType">
|
||||
<property name="whatsThis">
|
||||
<string>The curve used by the mix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="MixDR_CB">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_name">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
<string>Modes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -260,7 +403,7 @@
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@@ -272,211 +415,54 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_phases">
|
||||
<item row="3" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,1">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkOffsetUseSource">
|
||||
<property name="text">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cboOffsetSource">
|
||||
<property name="whatsThis">
|
||||
<string>The source for the mixer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sbOffsetValue"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="sourceCB"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Modes</string>
|
||||
<string>Weight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QComboBox" name="warningCB">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OFF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 Beep</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2 Beeps</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3 Beeps</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="lb_FP4">
|
||||
<property name="text">
|
||||
<string notr="true">4</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lb_FP3">
|
||||
<property name="text">
|
||||
<string notr="true">3</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLabel" name="lb_FP7">
|
||||
<property name="text">
|
||||
<string notr="true">7</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cb_FP0">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="lb_FP2">
|
||||
<property name="text">
|
||||
<string notr="true">2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QCheckBox" name="cb_FP6">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="8">
|
||||
<widget class="QCheckBox" name="cb_FP8">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QLabel" name="lb_FP8">
|
||||
<property name="text">
|
||||
<string notr="true">8</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<widget class="QCheckBox" name="cb_FP7">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="cb_FP1">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QCheckBox" name="cb_FP5">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lb_FP1">
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lb_FP0">
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lb_FP6">
|
||||
<property name="text">
|
||||
<string notr="true">6</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="cb_FP2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="lb_FP5">
|
||||
<property name="text">
|
||||
<string notr="true">5</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QCheckBox" name="cb_FP4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="cb_FP3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="9">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Offset</string>
|
||||
<string>Source</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -491,10 +477,10 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -516,7 +502,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
@@ -543,7 +529,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Up</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -553,7 +539,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Down</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -580,7 +566,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
@@ -609,7 +595,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
@@ -632,7 +618,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
@@ -651,7 +637,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Precision</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -706,7 +692,6 @@ p, li { white-space: pre-wrap; }
|
||||
<tabstop>cboCurveSource</tabstop>
|
||||
<tabstop>sbCurveValue</tabstop>
|
||||
<tabstop>trimCB</tabstop>
|
||||
<tabstop>MixDR_CB</tabstop>
|
||||
<tabstop>cb_FP0</tabstop>
|
||||
<tabstop>cb_FP1</tabstop>
|
||||
<tabstop>cb_FP2</tabstop>
|
||||
|
||||
@@ -112,10 +112,8 @@ ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, Firmw
|
||||
addTab(new CustomFunctionsPanel(this, &model, generalSettings, firmware, sharedItemModels), tr("Special Functions"));
|
||||
s1.report("Special Functions");
|
||||
|
||||
if (firmware->getCapability(Telemetry)) {
|
||||
addTab(new TelemetryPanel(this, model, generalSettings, firmware, sharedItemModels), tr("Telemetry"));
|
||||
s1.report("Telemetry");
|
||||
}
|
||||
addTab(new TelemetryPanel(this, model, generalSettings, firmware, sharedItemModels), tr("Telemetry"));
|
||||
s1.report("Telemetry");
|
||||
|
||||
if (Boards::getCapability(firmware->getBoard(), Board::HasColorLcd)) {
|
||||
addTab(new ColorCustomScreensPanel(this, model, generalSettings, firmware, sharedItemModels), tr("Custom Screens"));
|
||||
|
||||
@@ -178,20 +178,10 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge
|
||||
ui->throttleSource->setModel(panelFilteredModels->getItemModel(FIM_THRSOURCE));
|
||||
ui->throttleSource->setField(model.thrTraceSrc, this);
|
||||
|
||||
if (!firmware->getCapability(HasDisplayText)) {
|
||||
ui->displayText->hide();
|
||||
ui->editChecklist->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(GlobalFunctions)) {
|
||||
ui->gfEnabled->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasADCJitterFilter))
|
||||
{
|
||||
ui->jitterFilter->hide();
|
||||
}
|
||||
|
||||
// Beep Center checkboxes
|
||||
prevFocus = ui->trimsDisplay;
|
||||
|
||||
|
||||
@@ -451,8 +451,8 @@ void ModulePanel::update()
|
||||
ui->channelsCount->setEnabled(mask & MASK_CHANNELS_COUNT);
|
||||
ui->channelsCount->setMaximum(module.getMaxChannelCount());
|
||||
ui->channelsCount->setValue(module.channelsCount);
|
||||
ui->channelsCount->setSingleStep(firmware->getCapability(HasPPMStart) ? 1 : 2);
|
||||
|
||||
ui->channelsCount->setSingleStep(1);
|
||||
|
||||
// CRSF
|
||||
ui->label_crsfArmingMode->setVisible(mask & MASK_CSRF_ARMING_MODE);
|
||||
ui->crsfArmingMode->setVisible(mask & MASK_CSRF_ARMING_MODE);
|
||||
|
||||
@@ -63,20 +63,10 @@ TimerPanel::TimerPanel(QWidget * parent, ModelData & model, TimerData & timer, G
|
||||
connect(ui->countdownBeep, SIGNAL(currentDataChanged(int)), this, SLOT(onCountdownBeepChanged(int)));
|
||||
|
||||
ui->minuteBeep->setField(timer.minuteBeep, this);
|
||||
|
||||
if (firmware->getCapability(PermTimers)) {
|
||||
ui->persistent->setModel(panelItemModels->getItemModel(AIM_TIMER_PERSISTENT));
|
||||
ui->persistent->setField(timer.persistent, this);
|
||||
}
|
||||
else {
|
||||
ui->persistent->hide();
|
||||
ui->persistentValue->hide();
|
||||
}
|
||||
|
||||
ui->persistent->setModel(panelItemModels->getItemModel(AIM_TIMER_PERSISTENT));
|
||||
ui->persistent->setField(timer.persistent, this);
|
||||
ui->countdownStart->setModel(panelItemModels->getItemModel(AIM_TIMER_COUNTDOWNSTART));
|
||||
ui->countdownStart->setField(timer.countdownStart, this);
|
||||
|
||||
|
||||
ui->showElapsed->setModel(panelItemModels->getItemModel(AIM_TIMER_SHOWELAPSED));
|
||||
ui->showElapsed->setField(timer.showElapsed, this);
|
||||
|
||||
@@ -126,10 +116,8 @@ void TimerPanel::update()
|
||||
ui->countdownStart->setEnabled(true);
|
||||
}
|
||||
|
||||
if (firmware->getCapability(PermTimers)) {
|
||||
ui->persistent->updateValue();
|
||||
ui->persistentValue->setText(timer.pvalueToString());
|
||||
}
|
||||
ui->persistent->updateValue();
|
||||
ui->persistentValue->setText(timer.pvalueToString());
|
||||
|
||||
if (timer.val) {
|
||||
ui->showElapsed->setEnabled(true);
|
||||
|
||||
@@ -434,9 +434,7 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
|
||||
if (sensorCapability > CPN_MAX_SENSORS) // TODO should be role of getCapability
|
||||
sensorCapability = CPN_MAX_SENSORS;
|
||||
|
||||
if (firmware->getCapability(NoTelemetryProtocol)) {
|
||||
model.frsky.usrProto = 1;
|
||||
}
|
||||
model.frsky.usrProto = 1;
|
||||
|
||||
ui->varioSource->setModel(panelFilteredItemModels->getItemModel(FIM_TELEVARIOSRC));
|
||||
ui->varioSource->setField(model.frsky.varioSource, this);
|
||||
@@ -542,16 +540,9 @@ void TelemetryPanel::setup()
|
||||
}
|
||||
|
||||
ui->altimetryGB->setVisible(firmware->getCapability(HasVario)),
|
||||
ui->frskyProtoCB->setDisabled(firmware->getCapability(NoTelemetryProtocol));
|
||||
|
||||
if (firmware->getCapability(Telemetry)) {
|
||||
ui->frskyProtoCB->addItem(tr("Winged Shadow How High"));
|
||||
}
|
||||
else {
|
||||
ui->frskyProtoCB->addItem(tr("Winged Shadow How High (not supported)"));
|
||||
}
|
||||
|
||||
ui->variousGB->hide();
|
||||
ui->frskyProtoCB->setDisabled(true);
|
||||
ui->frskyProtoCB->addItem(tr("Winged Shadow How High"));
|
||||
ui->variousGB->hide(); // TODO remove from ui design and code
|
||||
|
||||
lock = false;
|
||||
}
|
||||
|
||||
@@ -420,8 +420,6 @@ QString ModelPrinter::printMixerLine(const MixData & mix, bool showMultiplex, in
|
||||
else if (mix.carryTrim < 0)
|
||||
str += " " + RawSource(SOURCE_TYPE_TRIM, (-(mix.carryTrim)-1) + 1).toString(&model, &generalSettings);
|
||||
|
||||
if (firmware->getCapability(HasNoExpo) && mix.noExpo)
|
||||
str += " " + tr("No DR/Expo").toHtmlEscaped();
|
||||
if (mix.sOffset)
|
||||
str += " " + tr("Offset(%1)").arg(SourceNumRef(mix.sOffset).toString(&model, &generalSettings)).toHtmlEscaped();
|
||||
if (mix.curve.value)
|
||||
@@ -634,12 +632,11 @@ QString ModelPrinter::printLogicalSwitchLine(int idx)
|
||||
result += RawSwitch(ls.andsw).toString(getCurrentBoard(), &generalSettings);
|
||||
}
|
||||
|
||||
if (firmware->getCapability(LogicalSwitchesExt)) {
|
||||
if (ls.duration)
|
||||
result += " " + tr("Duration") + QString("(%1s)").arg(ls.duration/10.0);
|
||||
if (ls.delay)
|
||||
result += " " + tr("Delay") + QString("(%1s)").arg(ls.delay/10.0);
|
||||
}
|
||||
if (ls.duration)
|
||||
result += " " + tr("Duration") + QString("(%1s)").arg(ls.duration/10.0);
|
||||
|
||||
if (ls.delay)
|
||||
result += " " + tr("Delay") + QString("(%1s)").arg(ls.delay/10.0);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -746,8 +743,7 @@ QString ModelPrinter::printSettingsOther()
|
||||
{
|
||||
QStringList str;
|
||||
str << printLabelValue(tr("Extended Limits"), printBoolean(model.extendedLimits, BOOLEAN_YESNO));
|
||||
if (firmware->getCapability(HasDisplayText))
|
||||
str << printLabelValue(tr("Display Checklist"), printBoolean(model.displayChecklist, BOOLEAN_YESNO));
|
||||
str << printLabelValue(tr("Display Checklist"), printBoolean(model.displayChecklist, BOOLEAN_YESNO));
|
||||
if (firmware->getCapability(GlobalFunctions))
|
||||
str << printLabelValue(tr("Global Functions"), printBoolean(!model.noGlobalFunctions, BOOLEAN_YESNO));
|
||||
return str.join(" ");
|
||||
|
||||
@@ -274,8 +274,7 @@ QString MultiModelPrinter::print(QTextDocument * document)
|
||||
document->setDefaultStyleSheet(css.text());
|
||||
QString str = "<table cellspacing='0' cellpadding='3' width='100%'>"; // attributes not settable via QT stylesheet
|
||||
str.append(printSetup());
|
||||
if (firmware->getCapability(HasDisplayText))
|
||||
str.append(printChecklist());
|
||||
str.append(printChecklist());
|
||||
if (firmware->getCapability(Timers)) {
|
||||
str.append(printTimers());
|
||||
}
|
||||
@@ -292,18 +291,14 @@ QString MultiModelPrinter::print(QTextDocument * document)
|
||||
str.append(printMixers());
|
||||
str.append(printOutputs());
|
||||
str.append(printCurves(document));
|
||||
if (firmware->getCapability(Gvars) && !firmware->getCapability(GvarsFlightModes))
|
||||
str.append(printGvars());
|
||||
str.append(printLogicalSwitches());
|
||||
if (firmware->getCapability(GlobalFunctions))
|
||||
str.append(printGlobalFunctions());
|
||||
str.append(printSpecialFunctions());
|
||||
if (firmware->getCapability(Telemetry)) {
|
||||
str.append(printTelemetry());
|
||||
str.append(printSensors());
|
||||
if (firmware->getCapability(TelemetryCustomScreens)) {
|
||||
str.append(printTelemetryScreens());
|
||||
}
|
||||
str.append(printTelemetry());
|
||||
str.append(printSensors());
|
||||
if (firmware->getCapability(TelemetryCustomScreens)) {
|
||||
str.append(printTelemetryScreens());
|
||||
}
|
||||
str.append("</table>");
|
||||
return str;
|
||||
@@ -463,71 +458,63 @@ QString MultiModelPrinter::printFlightModes()
|
||||
// GVars
|
||||
int gvars = firmware->getCapability(Gvars);
|
||||
|
||||
if (gvars && firmware->getCapability(GvarsFlightModes)) {
|
||||
MultiColumns columns(modelPrinterMap.size());
|
||||
columns.appendSectionTableStart();
|
||||
QStringList hd = QStringList() << tr("Global vars");
|
||||
if (firmware->getCapability(GvarsFlightModes)) {
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
hd << tr("GV%1").arg(i + 1);
|
||||
}
|
||||
}
|
||||
columns.appendRowHeader(hd);
|
||||
int wd = 80 / gvars;
|
||||
if (firmware->getCapability(GvarsFlightModes)) {
|
||||
columns.appendRowStart(tr("Name"), 20);
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELLWIDTH(model->gvarData[i].name, wd);
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Unit"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarUnit(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Prec"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarPrec(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Min"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarMin(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Max"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarMax(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Popup"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarPopup(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
}
|
||||
|
||||
columns.appendRowHeader(
|
||||
QStringList() << (Boards::getCapability(getCurrentBoard(), Board::Air)
|
||||
? tr("Flight mode")
|
||||
: tr("Drive mode")));
|
||||
|
||||
for (int i = 0; i < firmware->getCapability(FlightModes); i++) {
|
||||
columns.appendRowStart();
|
||||
columns.appendCellStart(0, true);
|
||||
COMPARE(modelPrinter->printFlightModeName(i));
|
||||
columns.appendCellEnd(true);
|
||||
if (firmware->getCapability(GvarsFlightModes)) {
|
||||
for (int k = 0; k < gvars; k++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVar(i, k));
|
||||
}
|
||||
}
|
||||
|
||||
columns.appendRowEnd();
|
||||
}
|
||||
columns.appendTableEnd();
|
||||
str.append(columns.print());
|
||||
MultiColumns columns(modelPrinterMap.size());
|
||||
columns.appendSectionTableStart();
|
||||
QStringList hd = QStringList() << tr("Global vars");
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
hd << tr("GV%1").arg(i + 1);
|
||||
}
|
||||
columns.appendRowHeader(hd);
|
||||
int wd = 80 / gvars;
|
||||
columns.appendRowStart(tr("Name"), 20);
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELLWIDTH(model->gvarData[i].name, wd);
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Unit"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarUnit(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Prec"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarPrec(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Min"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarMin(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Max"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarMax(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendRowStart(tr("Popup"));
|
||||
for (int i = 0; i < gvars; i++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVarPopup(i));
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
|
||||
columns.appendRowHeader(
|
||||
QStringList() << (Boards::getCapability(getCurrentBoard(), Board::Air)
|
||||
? tr("Flight mode")
|
||||
: tr("Drive mode")));
|
||||
|
||||
for (int i = 0; i < firmware->getCapability(FlightModes); i++) {
|
||||
columns.appendRowStart();
|
||||
columns.appendCellStart(0, true);
|
||||
COMPARE(modelPrinter->printFlightModeName(i));
|
||||
columns.appendCellEnd(true);
|
||||
for (int k = 0; k < gvars; k++) {
|
||||
COMPARECELL(modelPrinter->printGlobalVar(i, k));
|
||||
}
|
||||
|
||||
columns.appendRowEnd();
|
||||
}
|
||||
columns.appendTableEnd();
|
||||
str.append(columns.print());
|
||||
|
||||
return str;
|
||||
}
|
||||
@@ -542,16 +529,14 @@ QString MultiModelPrinter::printOutputs()
|
||||
hd << tr("Curve");
|
||||
if (firmware->getCapability(PPMCenter))
|
||||
hd << tr("PPM");
|
||||
if (firmware->getCapability(SYMLimits))
|
||||
hd << tr("Linear");
|
||||
hd << tr("Linear");
|
||||
columns.appendRowHeader(hd);
|
||||
int cols = 4;
|
||||
if (IS_HORUS_OR_TARANIS(firmware->getBoard()))
|
||||
cols++;
|
||||
if (firmware->getCapability(PPMCenter))
|
||||
cols++;
|
||||
if (firmware->getCapability(SYMLimits))
|
||||
cols++;
|
||||
cols++;
|
||||
int wd = 80/cols;
|
||||
for (int i=0; i<firmware->getCapability(Outputs); i++) {
|
||||
int count = 0;
|
||||
@@ -573,9 +558,7 @@ QString MultiModelPrinter::printOutputs()
|
||||
if (firmware->getCapability(PPMCenter)) {
|
||||
COMPARECELLWIDTH(modelPrinter->printOutputPpmCenter(i), wd);
|
||||
}
|
||||
if (firmware->getCapability(SYMLimits)) {
|
||||
COMPARECELLWIDTH(modelPrinter->printOutputSymetrical(i), wd);
|
||||
}
|
||||
COMPARECELLWIDTH(modelPrinter->printOutputSymetrical(i), wd);
|
||||
columns.appendRowEnd();
|
||||
}
|
||||
columns.appendTableEnd();
|
||||
@@ -583,27 +566,6 @@ QString MultiModelPrinter::printOutputs()
|
||||
return str;
|
||||
}
|
||||
|
||||
QString MultiModelPrinter::printGvars()
|
||||
{
|
||||
QString str = printTitle(tr("Global Variables"));
|
||||
int gvars = firmware->getCapability(Gvars);
|
||||
MultiColumns columns(modelPrinterMap.size());
|
||||
columns.appendSectionTableStart();
|
||||
QStringList hd;
|
||||
for (int i=0; i<gvars; i++) {
|
||||
hd << tr("GV%1").arg(i+1);
|
||||
}
|
||||
columns.appendRowHeader(hd);
|
||||
|
||||
for (int i=0; i<gvars; i++) {
|
||||
COMPARECELL(model->flightModeData[0].gvars[i]);
|
||||
}
|
||||
columns.appendRowEnd();
|
||||
columns.appendTableEnd();
|
||||
str.append(columns.print());
|
||||
return str;
|
||||
}
|
||||
|
||||
QString MultiModelPrinter::printInputs()
|
||||
{
|
||||
QString str = printTitle(tr("Inputs"));
|
||||
|
||||
@@ -87,7 +87,6 @@ class MultiModelPrinter: public QObject
|
||||
QString printInputs();
|
||||
QString printMixers();
|
||||
QString printCurves(QTextDocument * document);
|
||||
QString printGvars();
|
||||
QString printLogicalSwitches();
|
||||
QString printSpecialFunctions();
|
||||
QString printTelemetry();
|
||||
|
||||
@@ -304,7 +304,7 @@ static const QList<RadioKeyDefinition> radioKeyDefinitions = {
|
||||
|
||||
void SimulatedUIWidget::addScrollActions()
|
||||
{
|
||||
if (g.simuScrollButtons() || !getCurrentFirmware()->getCapability(RotaryEncoderNavigation))
|
||||
if (g.simuScrollButtons() || !Boards::getCapability(m_board, Board::RotaryEncoderNavigation))
|
||||
return;
|
||||
|
||||
const RadioKeyDefinition *updefn = getRadioKeyDefinition(KEY_SCRLUP);
|
||||
@@ -395,7 +395,7 @@ void SimulatedUIWidget::addPushButtons(ButtonsWidget * leftButtons, ButtonsWidge
|
||||
qDebug() << "Unknown key:" << info.key.c_str() << info.name.c_str() << info.label.c_str();
|
||||
}
|
||||
|
||||
if (g.simuScrollButtons() && getCurrentFirmware()->getCapability(RotaryEncoderNavigation)) {
|
||||
if (g.simuScrollButtons() && Boards::getCapability(m_board, Board::RotaryEncoderNavigation)) {
|
||||
addPushButton(KEY_SCRLUP, tr("Scrl Up"), leftButtons, leftButtonsGrid, rightButtons, rightButtonsGrid);
|
||||
addPushButton(KEY_SCRLDN, tr("Scrl Dn"), leftButtons, leftButtonsGrid, rightButtons, rightButtonsGrid);
|
||||
connectScrollActions();
|
||||
|
||||
@@ -188,7 +188,6 @@ bool LabelsStorageFormat::write(RadioData & radioData)
|
||||
|
||||
if (loadRadioSettings(gsCur)) {
|
||||
GeneralSettings & gsNew = radioData.generalSettings;
|
||||
gsNew.txCurrentCalibration = gsCur.txCurrentCalibration;
|
||||
gsNew.txVoltageCalibration = gsCur.txVoltageCalibration;
|
||||
|
||||
for (int i = 0; i < CPN_MAX_INPUTS; i++) {
|
||||
|
||||
Reference in New Issue
Block a user