chore(cpn): move capabilities from firmware to boards, remove unused (#7070)
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user