chore(cpn): remove radio settings calibration tab (#6726)

This commit is contained in:
Neil Horne
2025-10-29 11:57:32 +10:00
committed by GitHub
parent edaba32e2b
commit 17ecdc4c9c
4 changed files with 0 additions and 106 deletions
-1
View File
@@ -2,7 +2,6 @@
project(generaledit)
set(${PROJECT_NAME}_NAMES
calibration
generaledit
generaloptions
generalsetup
-68
View File
@@ -1,68 +0,0 @@
/*
* Copyright (C) EdgeTX
*
* Based on code named
* opentx - https://github.com/opentx/opentx
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "calibration.h"
#include "autospinbox.h"
#include "helpers.h"
CalibrationPanel::CalibrationPanel(QWidget * parent, GeneralSettings & generalSettings, Firmware * firmware):
GeneralPanel(parent, generalSettings, firmware)
{
int maxrows = Boards::getInputsCalibrated();
int maxinputs = Boards::getCapability(getCurrentBoard(), Board::Inputs);
QStringList headerLabels;
headerLabels << "" << tr("Negative span") << tr("Mid value") << tr("Positive span");
TableLayout * tableLayout = new TableLayout(this, maxrows, headerLabels);
for (int i = 0; i < maxinputs; i++) {
if (!Boards::isInputCalibrated(i))
continue;
GeneralSettings::InputCalib &calib = generalSettings.inputConfig[i].calib;
int col = 0;
QLabel * label = new QLabel(this);
label->setText(Boards::getInputName(i));
tableLayout->addWidget(i, col++, label);
QLineEdit * leNeg = new QLineEdit(this);
leNeg->setText(QString("%1").arg(calib.spanNeg));
leNeg->setReadOnly(true);
tableLayout->addWidget(i, col++, leNeg);
QLineEdit * leMid = new QLineEdit(this);
leMid->setText(QString("%1").arg(calib.mid));
leMid->setReadOnly(true);
tableLayout->addWidget(i, col++, leMid);
QLineEdit * lePos = new QLineEdit(this);
lePos->setText(QString("%1").arg(calib.spanPos));
lePos->setReadOnly(true);
tableLayout->addWidget(i, col++, lePos);
}
disableMouseScrolling();
tableLayout->resizeColumnsToContents();
tableLayout->setColumnWidth(0, QString(15, ' '));
tableLayout->pushColumnsLeft(headerLabels.count());
tableLayout->pushRowsUp(maxrows + 1);
}
-35
View File
@@ -1,35 +0,0 @@
/*
* Copyright (C) EdgeTX
*
* Based on code named
* opentx - https://github.com/opentx/opentx
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#pragma once
#include "generaledit.h"
class CalibrationPanel : public GeneralPanel
{
Q_OBJECT
public:
CalibrationPanel(QWidget *parent, GeneralSettings & generalSettings, Firmware * firmware);
virtual ~CalibrationPanel() {};
private:
};
@@ -25,7 +25,6 @@
#include "appdata.h"
#include "generalsetup.h"
#include "trainer.h"
#include "calibration.h"
#include "hardware.h"
#include "../modeledit/customfunctions.h"
#include "generaloptions.h"
@@ -56,7 +55,6 @@ GeneralEdit::GeneralEdit(QWidget * parent, RadioData & radioData, Firmware * fir
addTab(new TrainerPanel(this, generalSettings, firmware, editorItemModels), tr("Trainer"));
auto hwpnl = new HardwarePanel(this, generalSettings, firmware, editorItemModels);
addTab(hwpnl, tr("Hardware"));
addTab(new CalibrationPanel(this, generalSettings, firmware), tr("Calibration"));
addTab(new GeneralOptionsPanel(this, generalSettings, firmware), tr("Enabled Features"));
connect(hwpnl, &HardwarePanel::internalModuleChanged, this, [&] { intModChanged = true; });