[Companion] Horus fixes
This commit is contained in:
@@ -562,7 +562,7 @@ int OpenTxFirmware::getCapability(Capability capability)
|
|||||||
else if (IS_TARANIS_X9E(board))
|
else if (IS_TARANIS_X9E(board))
|
||||||
return 4;
|
return 4;
|
||||||
else if (IS_TARANIS(board))
|
else if (IS_TARANIS(board))
|
||||||
return 3; //Taranis has only 2 pots but still has a placeholder in settings for 3 pots
|
return 3; // Taranis has only 2 pots but still has a placeholder in settings for 3 pots
|
||||||
else
|
else
|
||||||
return 3;
|
return 3;
|
||||||
case Sliders:
|
case Sliders:
|
||||||
@@ -908,7 +908,7 @@ bool OpenTxFirmware::isTelemetrySourceAvailable(int source)
|
|||||||
|
|
||||||
int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
||||||
{
|
{
|
||||||
if (IS_TARANIS(board)) {
|
if (IS_TARANIS(board) || IS_HORUS(board)) {
|
||||||
switch (port) {
|
switch (port) {
|
||||||
case 0:
|
case 0:
|
||||||
switch (proto) {
|
switch (proto) {
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ void TimerPanel::on_name_editingFinished()
|
|||||||
#define FAILSAFE_CHANNEL_HOLD 2000
|
#define FAILSAFE_CHANNEL_HOLD 2000
|
||||||
#define FAILSAFE_CHANNEL_NOPULSE 2001
|
#define FAILSAFE_CHANNEL_NOPULSE 2001
|
||||||
|
|
||||||
ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module, GeneralSettings & generalSettings, Firmware * firmware, int moduleIdx):
|
ModulePanel::ModulePanel(QWidget * parent, ModelData & model, ModuleData & module, GeneralSettings & generalSettings, Firmware * firmware, int moduleIdx):
|
||||||
ModelPanel(parent, model, generalSettings, firmware),
|
ModelPanel(parent, model, generalSettings, firmware),
|
||||||
module(module),
|
module(module),
|
||||||
moduleIdx(moduleIdx),
|
moduleIdx(moduleIdx),
|
||||||
@@ -174,7 +174,7 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module
|
|||||||
ui->label_trainerMode->hide();
|
ui->label_trainerMode->hide();
|
||||||
ui->trainerMode->hide();
|
ui->trainerMode->hide();
|
||||||
if (firmware->getCapability(NumModules) > 1) {
|
if (firmware->getCapability(NumModules) > 1) {
|
||||||
if (IS_TARANIS(firmware->getBoard())) {
|
if (IS_TARANIS(firmware->getBoard()) || IS_HORUS(firmware->getBoard())) {
|
||||||
if (moduleIdx == 0)
|
if (moduleIdx == 0)
|
||||||
label = tr("Internal Radio System");
|
label = tr("Internal Radio System");
|
||||||
else
|
else
|
||||||
@@ -294,7 +294,7 @@ void ModulePanel::update()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (IS_TARANIS(firmware->getBoard())) {
|
else if (IS_TARANIS(firmware->getBoard()) || IS_HORUS(firmware->getBoard())) {
|
||||||
if (model->trainerMode == TRAINER_SLAVE_JACK) {
|
if (model->trainerMode == TRAINER_SLAVE_JACK) {
|
||||||
mask |= MASK_PPM_FIELDS | MASK_CHANNELS_RANGE | MASK_CHANNELS_COUNT;
|
mask |= MASK_PPM_FIELDS | MASK_CHANNELS_RANGE | MASK_CHANNELS_COUNT;
|
||||||
}
|
}
|
||||||
@@ -851,40 +851,16 @@ void SetupPanel::on_image_currentIndexChanged(int index)
|
|||||||
|
|
||||||
void SetupPanel::populateThrottleSourceCB()
|
void SetupPanel::populateThrottleSourceCB()
|
||||||
{
|
{
|
||||||
const QString pots9x[] = { QObject::tr("P1"), QObject::tr("P2"), QObject::tr("P3")};
|
|
||||||
const QString potsTaranis[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("S3"), QObject::tr("LS"), QObject::tr("RS")};
|
|
||||||
const QString potsTaranisX9E[] = { QObject::tr("F1"), QObject::tr("F2"), QObject::tr("F3"), QObject::tr("F4"), QObject::tr("S1"), QObject::tr("S2"), QObject::tr("LS"), QObject::tr("RS")};
|
|
||||||
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
lock = true;
|
lock = true;
|
||||||
|
|
||||||
ui->throttleSource->clear();
|
ui->throttleSource->clear();
|
||||||
ui->throttleSource->addItem(QObject::tr("THR"));
|
ui->throttleSource->addItem(QObject::tr("THR"));
|
||||||
|
for (int i=0; i<firmware->getCapability(Pots)+firmware->getCapability(Sliders); i++) {
|
||||||
if (IS_TARANIS_X9E(GetEepromInterface()->getBoard())) {
|
ui->throttleSource->addItem(firmware->getAnalogInputName(4+i), i);
|
||||||
for (i=0; i<8; i++) {
|
|
||||||
ui->throttleSource->addItem(potsTaranisX9E[i], i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
for (int i=0; i<firmware->getCapability(Outputs); i++) {
|
||||||
for (i=0; i<5; i++) {
|
|
||||||
ui->throttleSource->addItem(potsTaranis[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (i=0; i<3; i++) {
|
|
||||||
ui->throttleSource->addItem(pots9x[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int channels = (IS_ARM(GetEepromInterface()->getBoard()) ? 32 : 16);
|
|
||||||
for (int i=0; i<channels; i++) {
|
|
||||||
ui->throttleSource->addItem(ModelPrinter::printChannelName(i));
|
ui->throttleSource->addItem(ModelPrinter::printChannelName(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->throttleSource->setCurrentIndex(model->thrTraceSrc);
|
ui->throttleSource->setCurrentIndex(model->thrTraceSrc);
|
||||||
|
|
||||||
lock = false;
|
lock = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -895,8 +871,6 @@ void SetupPanel::update()
|
|||||||
ui->throttleReverse->setChecked(model->throttleReversed);
|
ui->throttleReverse->setChecked(model->throttleReversed);
|
||||||
populateThrottleSourceCB();
|
populateThrottleSourceCB();
|
||||||
ui->throttleWarning->setChecked(!model->disableThrottleWarning);
|
ui->throttleWarning->setChecked(!model->disableThrottleWarning);
|
||||||
|
|
||||||
//trim inc, thro trim, thro expo, instatrim
|
|
||||||
ui->trimIncrement->setCurrentIndex(model->trimInc+2);
|
ui->trimIncrement->setCurrentIndex(model->trimInc+2);
|
||||||
ui->throttleTrim->setChecked(model->thrTrim);
|
ui->throttleTrim->setChecked(model->thrTrim);
|
||||||
ui->extendedLimits->setChecked(model->extendedLimits);
|
ui->extendedLimits->setChecked(model->extendedLimits);
|
||||||
@@ -911,12 +885,15 @@ void SetupPanel::update()
|
|||||||
updatePotWarnings();
|
updatePotWarnings();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<firmware->getCapability(Timers); i++)
|
for (int i=0; i<firmware->getCapability(Timers); i++) {
|
||||||
timers[i]->update();
|
timers[i]->update();
|
||||||
|
}
|
||||||
|
|
||||||
for (int i=0; i<CPN_MAX_MODULES+1; i++)
|
for (int i=0; i<CPN_MAX_MODULES+1; i++) {
|
||||||
if (modules[i])
|
if (modules[i]) {
|
||||||
modules[i]->update();
|
modules[i]->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupPanel::updateBeepCenter()
|
void SetupPanel::updateBeepCenter()
|
||||||
|
|||||||
Reference in New Issue
Block a user