feat(bw): add 'Set Screen' special function to B&W radios (#5589)

This commit is contained in:
philmoz
2024-10-17 15:58:34 +10:00
committed by GitHub
parent 200518cc9a
commit e8224b8f08
46 changed files with 183 additions and 43 deletions
+13 -1
View File
@@ -261,7 +261,6 @@ 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 == FuncDisableAudioAmp && !Boards::getCapability(fw->getBoard(), Board::HasAudioMuteGPIO))) ||
((index == FuncRGBLed && !Boards::getCapability(fw->getBoard(), Board::HasLedStripGPIO))) ||
((index == FuncLCDtoVideo && !IS_FATFISH_F16(fw->getBoard()))) ||
@@ -424,6 +423,19 @@ AbstractStaticItemModel * CustomFunctionData::repeatLuaItemModel()
return mdl;
}
// static
AbstractStaticItemModel * CustomFunctionData::repeatSetScreenItemModel()
{
AbstractStaticItemModel * mdl = new AbstractStaticItemModel();
mdl->setName("customfunctiondata.repeatSetScreen");
mdl->appendToItemList(repeatToString(-1, false), -1);
mdl->appendToItemList(repeatToString(0, false), 0);
mdl->loadItemList();
return mdl;
}
// static
AbstractStaticItemModel * CustomFunctionData::playSoundItemModel()
{