feat: Add SF to mute audio amplifier on supported radios (#3753)

* SF Audio amplifier mute port to 2.10

* added missing definition STR_SF_DISABLE_AUDIO_AMP

* exclude radios not able to switch audio amp off

* radio/src/storage/yaml/yaml_datastructs_128x64.cpp needs to distinguish between radios with or without switchable audio amps. Expample Zorro vs X9lites

* updated companion and radio language PL

* - added Companion and radio language SE

- removed type unfinished for translated languages

* added radio and companion language JP

* - reverted change to 128x64 yaml_datastructs.h

- moved exclusion of SF DISABLE_AUDIO_AMP based on hw capabilities to UI level

* confused FUNC_ with FUNCTION_

* confused FUNCTION_* with FUNC_*
This commit is contained in:
Michael
2023-09-14 19:33:03 +10:00
committed by GitHub
parent 16276d3d15
commit d30499f19b
53 changed files with 148 additions and 3 deletions
@@ -125,6 +125,8 @@ QString CustomFunctionData::funcToString(const AssignFunc func, const ModelData
return tr("Disable Touch");
else if (func == FuncSetScreen)
return tr("Set Main Screen");
else if (func == FuncDisableAudioAmp)
return tr("Audio Amp Off");
else {
return QString(CPN_STR_UNKNOWN_ITEM);
}
@@ -257,7 +259,8 @@ bool CustomFunctionData::isFuncAvailable(const int index, const ModelData * mode
((index >= FuncRangeCheckInternalModule && index <= FuncBindExternalModule) && !fw->getCapability(DangerousFunctions)) ||
((index >= FuncAdjustGV1 && index <= FuncAdjustGVLast) && !fw->getCapability(Gvars)) ||
((index == FuncDisableTouch) && !IS_HORUS_OR_TARANIS(fw->getBoard())) ||
((index == FuncSetScreen && !Boards::getCapability(fw->getBoard(), Board::HasColorLcd)))
((index == FuncSetScreen && !Boards::getCapability(fw->getBoard(), Board::HasColorLcd)) ||
((index == FuncDisableAudioAmp && !Boards::getCapability(fw->getBoard(), Board::HasAudioMuteGPIO))))
);
return !ret;
}
@@ -471,7 +474,8 @@ bool CustomFunctionData::isParamAvailable() const
FuncBindInternalModule,
FuncBindExternalModule,
FuncRacingMode,
FuncDisableTouch
FuncDisableTouch,
FuncDisableAudioAmp
};
return funcList.contains(func) ? false : true;