1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 09:45:21 +03:00

Cosmetics

This commit is contained in:
bsongis 2014-06-04 15:01:19 +02:00
parent 458e41744b
commit f09e1338f6
5 changed files with 3 additions and 13 deletions

View file

@ -1099,7 +1099,6 @@ enum Capability {
SoundMod, SoundMod,
SoundPitch, SoundPitch,
MaxVolume, MaxVolume,
Beeperlen,
EepromBackup, EepromBackup,
Haptic, Haptic,
HasBeeper, HasBeeper,
@ -1110,7 +1109,6 @@ enum Capability {
HasMixerNames, HasMixerNames,
HasChNames, HasChNames,
HasCvNames, HasCvNames,
HasFuncRepeat,
HasPxxCountry, HasPxxCountry,
HasPPMStart, HasPPMStart,
HasGeneralUnits, HasGeneralUnits,
@ -1144,7 +1142,6 @@ enum Capability {
HasCurrentCalibration, HasCurrentCalibration,
HasVolume, HasVolume,
HasBrightness, HasBrightness,
HasContrast,
PerModelTimers, PerModelTimers,
SlowScale, SlowScale,
SlowRange, SlowRange,

View file

@ -569,11 +569,6 @@ int OpenTxFirmware::getCapability(const Capability capability)
return 1; return 1;
else else
return 0; return 0;
case HasFuncRepeat:
case HasContrast:
return 1;
case Beeperlen:
return 1;
case MaxVolume: case MaxVolume:
return (IS_ARM(board) ? 23 : 7); return (IS_ARM(board) ? 23 : 7);
case HasSoundMixer: case HasSoundMixer:
@ -915,6 +910,7 @@ QString OpenTxFirmware::getFirmwareUrl(QString & id)
url.append(QString("/getfw.php?fw=%1.hex").arg(id)); url.append(QString("/getfw.php?fw=%1.hex").arg(id));
break; break;
case BOARD_SKY9X: case BOARD_SKY9X:
case BOARD_9XRPRO:
case BOARD_TARANIS: case BOARD_TARANIS:
case BOARD_TARANIS_PLUS: case BOARD_TARANIS_PLUS:
url.append(QString("/getfw.php?fw=%1.bin").arg(id)); url.append(QString("/getfw.php?fw=%1.bin").arg(id));

View file

@ -103,10 +103,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
mavbaudEditLock=false; mavbaudEditLock=false;
} }
if (!GetCurrentFirmware()->getCapability(HasContrast)) {
ui->contrastSB->hide();
ui->label_contrast->hide();
}
if (!GetCurrentFirmware()->getCapability(HasSoundMixer)) { if (!GetCurrentFirmware()->getCapability(HasSoundMixer)) {
ui->beepVolume_SL->hide(); ui->beepVolume_SL->hide();
ui->beepVolume_label->hide(); ui->beepVolume_label->hide();

View file

@ -496,6 +496,7 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
void MainWindow::startFirmwareDownload() void MainWindow::startFirmwareDownload()
{ {
QString url = current_firmware_variant.getFirmwareUrl(); QString url = current_firmware_variant.getFirmwareUrl();
qDebug() << url;
QString ext = url.mid(url.lastIndexOf(".")); QString ext = url.mid(url.lastIndexOf("."));
QString defaultFilename = g.flashDir() + "/" + current_firmware_variant.id; QString defaultFilename = g.flashDir() + "/" + current_firmware_variant.id;
if (g.profile[g.id()].renameFwFiles()) { if (g.profile[g.id()].renameFwFiles()) {

View file

@ -376,7 +376,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_ENABLE; widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_ENABLE;
} }
else if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) { else if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) {
if (index != FuncBackgroundMusic && firmware->getCapability(HasFuncRepeat)) { if (index != FuncBackgroundMusic) {
widgetsMask |= CUSTOM_FUNCTION_REPEAT; widgetsMask |= CUSTOM_FUNCTION_REPEAT;
fswtchRepeat[i]->update(); fswtchRepeat[i]->update();
} }