Companion support for EXT3 EXT4 and FlySky gimbals

This commit is contained in:
elecpower
2021-12-31 10:53:10 +01:00
committed by Raphael Coeffic
parent f6329895a8
commit 23c84633da
13 changed files with 51 additions and 22 deletions
+9 -2
View File
@@ -25,15 +25,22 @@
CalibrationPanel::CalibrationPanel(QWidget * parent, GeneralSettings & generalSettings, Firmware * firmware):
GeneralPanel(parent, generalSettings, firmware)
{
int rows = Boards::getCapability(getCurrentBoard(), Board::MaxAnalogs);
Board::Type board = getCurrentBoard();
int rows = Boards::getCapability(board, Board::MaxAnalogs);
QStringList headerLabels;
headerLabels << "" << tr("Negative span") << tr("Mid value") << tr("Positive span");
TableLayout * tableLayout = new TableLayout(this, rows, headerLabels);
for (int i = 0; i < rows; i++) {
for (int i = 0, row = 0; i < rows; i++) {
int col = 0;
if (firmware->getCapability(HasFlySkyGimbals) &&
i >= (Boards::getCapability(board, Board::Sticks) + 5) &&
i < (Boards::getCapability(board, Board::Sticks) + 7))
continue;
row++;
QLabel * label = new QLabel(this);
label->setText(firmware->getAnalogInputName(i));
tableLayout->addWidget(i, col++, label);