[Companion] Show custom channel, G-Var, and Curve names throughout UI. (#4874)

* [Companion] Move RadioData constructor.

* [Companion] Move getCapability(SwitchPositions) to Boards class.

* [Companion] Show custom channel, g-var, & curve names throughout UI; Remove redundant name formatting and other unused functions in ModelPrinter and Helpers; Add CustomFunctionData::isEmpty().

* [Companion] Add LogicalSwitchData::isEmpty().

* [Companion] Fix small bug in HardwarePanel.

* [Companion] Rename logical switches to "LSw##" in selections lists to avoid confusion with "L#" and "LS" hardware controls; remove unused RotaryEncoderString().
This commit is contained in:
Max Paperno
2017-04-29 09:03:53 +02:00
committed by Bertrand Songis
parent 04bcc70422
commit 72b1ad085f
19 changed files with 180 additions and 199 deletions
+3 -3
View File
@@ -21,7 +21,7 @@
#include "hardware.h"
#include "ui_hardware.h"
void HardwarePanel::setupSwitchType(int index, QLabel * label, AutoLineEdit * name, AutoComboBox * type, bool threePos = true)
void HardwarePanel::setupSwitchType(int index, QLabel * label, AutoLineEdit * name, AutoComboBox * type, bool threePos)
{
Board::Type board = getCurrentBoard();
if (IS_STM32(board) && index < getBoardCapability(board, Board::Switches)) {
@@ -92,7 +92,7 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
ui(new Ui::Hardware)
{
ui->setupUi(this);
Board::Type board = firmware->getBoard();
if (IS_STM32(board)) {
@@ -163,7 +163,7 @@ HardwarePanel::HardwarePanel(QWidget * parent, GeneralSettings & generalSettings
ui->bluetoothEnable->hide();
ui->bluetoothName->hide();
}
if (IS_HORUS_OR_TARANIS(board)) {
ui->filterEnable->setChecked(!generalSettings.jitterFilter);
}