Cleaning work in Companion
This commit is contained in:
@@ -495,7 +495,6 @@ class GeneralSettings {
|
||||
bool disableBG;
|
||||
unsigned int splashMode;
|
||||
int splashDuration;
|
||||
uint8_t filterInput; // TODO enum
|
||||
unsigned int backlightDelay;
|
||||
bool blightinv;
|
||||
bool stickScroll;
|
||||
@@ -798,15 +797,6 @@ class FrSkyAlarmData {
|
||||
void clear() { memset(this, 0, sizeof(FrSkyAlarmData)); }
|
||||
};
|
||||
|
||||
class FrSkyErAlarmData {
|
||||
public:
|
||||
FrSkyErAlarmData() { clear(); }
|
||||
uint8_t frskyAlarmType ;
|
||||
uint8_t frskyAlarmLimit ;
|
||||
uint8_t frskyAlarmSound ;
|
||||
void clear() { memset(this, 0, sizeof(FrSkyErAlarmData)); }
|
||||
};
|
||||
|
||||
class FrSkyRSSIAlarm {
|
||||
public:
|
||||
FrSkyRSSIAlarm() { clear(0, 50); }
|
||||
@@ -990,7 +980,6 @@ class ModelData {
|
||||
|
||||
bool used;
|
||||
char name[12+1];
|
||||
uint8_t modelVoice;
|
||||
TimerData timers[2];
|
||||
bool thrTrim; // Enable Throttle Trim
|
||||
bool thrExpo; // Enable Throttle Expo
|
||||
@@ -1013,8 +1002,7 @@ class ModelData {
|
||||
LogicalSwitchData customSw[C9X_NUM_CSW];
|
||||
FuncSwData funcSw[C9X_MAX_CUSTOM_FUNCTIONS];
|
||||
SwashRingData swashRingData;
|
||||
unsigned int thrTraceSrc;
|
||||
int8_t traineron; // 0 disable trainer, 1 allow trainer
|
||||
unsigned int thrTraceSrc;
|
||||
unsigned int modelId;
|
||||
unsigned int switchWarningStates;
|
||||
unsigned int nSwToWarn;
|
||||
@@ -1024,9 +1012,6 @@ class ModelData {
|
||||
// TODO structure
|
||||
char gvars_names[C9X_MAX_GVARS][6+1];
|
||||
bool gvars_popups[C9X_MAX_GVARS];
|
||||
uint8_t gvsource[5];
|
||||
uint8_t bt_telemetry;
|
||||
uint8_t numVoice;
|
||||
MavlinkData mavlink;
|
||||
unsigned int telemetryProtocol;
|
||||
FrSkyData frsky;
|
||||
|
||||
@@ -356,7 +356,6 @@ t_Er9xModelData::operator ModelData ()
|
||||
{
|
||||
ModelData c9x;
|
||||
c9x.used = true;
|
||||
c9x.modelVoice = modelVoice;
|
||||
getEEPROMString(c9x.name, name, sizeof(name));
|
||||
c9x.timers[0].mode = getEr9xTimerMode(tmrMode);
|
||||
c9x.timers[0].dir = tmrDir;
|
||||
@@ -375,8 +374,6 @@ t_Er9xModelData::operator ModelData ()
|
||||
c9x.moduleData[0].protocol = PPM;
|
||||
break;
|
||||
}
|
||||
c9x.traineron= traineron;
|
||||
// c9x.t2throttle = t2throttle;
|
||||
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
|
||||
@@ -125,7 +125,6 @@ Ersky9xGeneral::operator GeneralSettings ()
|
||||
result.splashMode = disableSplashScreen;
|
||||
result.disablePotScroll=(disablePotScroll==1);
|
||||
result.disableBG=(disableBG==1);
|
||||
result.filterInput = filterInput;
|
||||
result.templateSetup = templateSetup;
|
||||
result.PPM_Multiplier = PPM_Multiplier;
|
||||
getEEPROMString(result.ownerName, ownerName, sizeof(ownerName));
|
||||
@@ -507,8 +506,6 @@ t_Ersky9xModelData_v10::operator ModelData ()
|
||||
c9x.moduleData[0].protocol = PPM;
|
||||
break;
|
||||
}
|
||||
c9x.traineron= traineron;
|
||||
// c9x.t2throttle = t2throttle;
|
||||
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
@@ -628,8 +625,6 @@ t_Ersky9xModelData_v11::operator ModelData ()
|
||||
c9x.moduleData[0].protocol = PPM;
|
||||
break;
|
||||
}
|
||||
c9x.traineron= traineron;
|
||||
// c9x.t2throttle = t2throttle;
|
||||
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
|
||||
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
|
||||
c9x.thrTrim = thrTrim;
|
||||
@@ -732,7 +727,7 @@ t_Ersky9xModelData_v11::operator ModelData ()
|
||||
// }
|
||||
for (int i=0; i<5;i++) {
|
||||
c9x.phaseData[0].gvars[i]=gvars[i].gvar;
|
||||
c9x.gvsource[i]=gvars[i].gvsource;
|
||||
// c9x.gvsource[i]=gvars[i].gvsource;
|
||||
}
|
||||
return c9x;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ Gruvin9xGeneral_v103::operator GeneralSettings ()
|
||||
result.flashBeep = flashBeep;
|
||||
result.splashMode = disableSplashScreen;
|
||||
result.enableTelemetryAlarm = enableTelemetryAlarm;
|
||||
result.filterInput = filterInput;
|
||||
result.templateSetup = templateSetup;
|
||||
result.PPM_Multiplier = PPM_Multiplier;
|
||||
// TODO frskyRssiAlarms[2];
|
||||
@@ -153,7 +152,6 @@ Gruvin9xGeneral_v104::operator GeneralSettings ()
|
||||
result.flashBeep = flashBeep;
|
||||
result.splashMode = disableSplashScreen;
|
||||
result.enableTelemetryAlarm = enableTelemetryAlarm;
|
||||
result.filterInput = filterInput;
|
||||
result.templateSetup = templateSetup;
|
||||
result.PPM_Multiplier = PPM_Multiplier;
|
||||
// TODO frskyRssiAlarms[2];
|
||||
|
||||
@@ -85,7 +85,6 @@ Th9xGeneral::operator GeneralSettings ()
|
||||
}
|
||||
result.stickMode = stickMode;
|
||||
result.inactivityTimer = inactivityMin;
|
||||
result.filterInput = adcFilt;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,8 @@ MainWindow::MainWindow():
|
||||
if (!(printing && (model >=0 && model<GetEepromInterface()->getMaxModels()) && !printfilename.isEmpty() )) {
|
||||
statusBar()->showMessage(tr("File loaded"), 2000);
|
||||
child->show();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
child->show();
|
||||
child->print(model,printfilename);
|
||||
child->close();
|
||||
@@ -1472,8 +1473,9 @@ MdiChild *MainWindow::createMdiChild()
|
||||
{
|
||||
MdiChild * child = new MdiChild();
|
||||
mdiArea->addSubWindow(child);
|
||||
if(!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized())
|
||||
if (!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized()) {
|
||||
child->parentWidget()->resize(400, 400);
|
||||
}
|
||||
|
||||
connect(child, SIGNAL(copyAvailable(bool)),cutAct, SLOT(setEnabled(bool)));
|
||||
connect(child, SIGNAL(copyAvailable(bool)),copyAct, SLOT(setEnabled(bool)));
|
||||
|
||||
@@ -71,13 +71,13 @@ MdiChild::MdiChild():
|
||||
fileChanged(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowIcon(CompanionIcon("open.png"));
|
||||
setWindowIcon(CompanionIcon("open.png"));
|
||||
ui->SimulateTxButton->setIcon(CompanionIcon("simulate.png"));
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
eepromInterfaceChanged();
|
||||
|
||||
if(!(this->isMaximized() || this->isMinimized())) {
|
||||
if (!(this->isMaximized() || this->isMinimized())) {
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
|
||||
@@ -299,14 +299,6 @@ void FlightModePanel::GVName_editingFinished()
|
||||
}
|
||||
}
|
||||
|
||||
void FlightModePanel::GVSource_currentIndexChanged(int index)
|
||||
{
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
int gvar = comboBox->property("index").toInt();
|
||||
model.gvsource[gvar] = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightModePanel::phaseGVUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
|
||||
@@ -35,7 +35,6 @@ class FlightModePanel : public ModelPanel
|
||||
void phaseTrim_valueChanged();
|
||||
void phaseTrimSlider_valueChanged();
|
||||
void GVName_editingFinished();
|
||||
void GVSource_currentIndexChanged(int index);
|
||||
void phaseGVValue_editingFinished();
|
||||
void phaseGVUse_currentIndexChanged(int index);
|
||||
void phaseGVPopupToggled(bool checked);
|
||||
|
||||
@@ -105,8 +105,6 @@ void saveGeneralSettings(GeneralSettings & settings, global_settings & gs)
|
||||
}
|
||||
/* TODO if (settings.disableSplashScreen)
|
||||
gs.splash_screen(false); */
|
||||
if (settings.filterInput)
|
||||
gs.filter_input(filter_input::value(settings.filterInput));
|
||||
/* TODO if (settings.backlightDelay)
|
||||
gs.light_auto_off_timer(settings.lightAutoOff); */
|
||||
gs.default_channel_order(settings.templateSetup);
|
||||
|
||||
Reference in New Issue
Block a user