refactor(cpn): Support JSON radio hardware definitions (#4406)
This commit is contained in:
@@ -35,8 +35,7 @@ TrainerPanel::TrainerPanel(QWidget * parent, GeneralSettings & generalSettings,
|
||||
int modeid = editorItemModels->registerItemModel(TrainerMix::modeItemModel());
|
||||
int srcid = editorItemModels->registerItemModel(TrainerMix::srcItemModel());
|
||||
|
||||
Board::Type board = getCurrentBoard();
|
||||
const int stickcnt = Boards::getCapability(board, Board::Sticks);
|
||||
const int stickcnt = Boards::getCapability(getCurrentBoard(), Board::Sticks);
|
||||
|
||||
const FieldRange weightrng = TrainerMix::getWeightRange();
|
||||
|
||||
@@ -50,9 +49,9 @@ TrainerPanel::TrainerPanel(QWidget * parent, GeneralSettings & generalSettings,
|
||||
addLabel(tr("Weight"), row, 2);
|
||||
addLabel(tr("Source"), row++, 3);
|
||||
|
||||
for (int i = 0; i < 4; i++, row++) { // TODO constant
|
||||
for (int i = 0; i < CPN_MAX_STICKS; i++, row++) {
|
||||
col = 0;
|
||||
addLabel(Boards::getAnalogInputName(board, i), row, col++);
|
||||
addLabel(Boards::getInputName(i), row, col++);
|
||||
|
||||
AutoComboBox *mode = new AutoComboBox(this);
|
||||
mode->setModel(editorItemModels->getItemModel(modeid));
|
||||
|
||||
Reference in New Issue
Block a user