feat(color): Add OneBit option to color radios (and Companion!!) (#1994)

* Added OneBit option also to color radios

* Try to work around GH repo owner issue

Original by @raphaelcoeffic in https://github.com/EdgeTX/edgetx/commit/bf4b5d8c0c1e386d5a4852a80d459540bab98ed3

* Add Companion support for radios with external module

* Companion housekeeping - do not display unnecessary hardware section headings

* fix: Rebase cleanup

* fix: LVGL changes

* feat: Move sample mode to a new Ext RF block

Co-authored-by: elecpower <neilh713@tpg.com.au>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Risto
2022-07-22 11:00:20 +10:00
committed by GitHub
co-authored by elecpower Peter Feerick
parent 54aaf5b9d9
commit 2ee75033bb
10 changed files with 167 additions and 9 deletions
@@ -606,6 +606,38 @@ AbstractStaticItemModel * GeneralSettings::stickDeadZoneItemModel()
return mdl;
}
QString GeneralSettings::uartSampleModeToString() const
{
return uartSampleModeToString(uartSampleMode);
}
// static
QString GeneralSettings::uartSampleModeToString(int value)
{
switch(value) {
case UART_SAMPLE_MODE_NORMAL:
return tr("Normal");
case UART_SAMPLE_MODE_ONEBIT:
return tr("OneBit");
default:
return CPN_STR_UNKNOWN_ITEM;
}
}
// static
AbstractStaticItemModel * GeneralSettings::uartSampleModeItemModel()
{
AbstractStaticItemModel * mdl = new AbstractStaticItemModel();
mdl->setName(AIM_GS_UARTSAMPLEMODE);
for (int i = 0; i < UART_SAMPLE_MODE_COUNT; i++) {
mdl->appendToItemList(uartSampleModeToString(i), i);
}
mdl->loadItemList();
return mdl;
}
/*
TrainerMix
*/