Merge pull request #899 from opentx/dvogonen/wizard

Dvogonen/wizard
This commit is contained in:
Bertrand Songis
2014-03-31 13:38:12 +02:00
140 changed files with 2347 additions and 3303 deletions
+3 -3
View File
@@ -159,9 +159,10 @@ set(companion_SRCS
splashlibrary.cpp
mainwindow.cpp
companion.cpp
modelconfigdialog.cpp
taranisnotfound.cpp
qcustomplot.cpp
wizarddata.cpp
wizarddialog.cpp
)
set(companion_MOC_HDRS
@@ -183,10 +184,10 @@ set(companion_MOC_HDRS
modelslist.h
mdichild.h
mainwindow.h
modelconfigdialog.h
taranisnotfound.h
qcustomplot.h
helpers.h
wizarddialog.h
)
set(companion_UIS
@@ -205,7 +206,6 @@ set(companion_UIS
customizesplashdialog.ui
splashlibrary.ui
burndialog.ui
modelconfigdialog.ui
taranisnotfound.ui
)
+15 -8
View File
@@ -1,5 +1,16 @@
// Companion Application Data Class Definition.
// Author Kjell Kernen
/*
* Author - Kjell Kernen
*
* 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 "appdata.h"
@@ -499,7 +510,6 @@ bool AppData::snapToClpbrd() { return _snapToClpbrd; }
bool AppData::autoCheckApp() { return _autoCheckApp; }
bool AppData::autoCheckFw() { return _autoCheckFw; }
bool AppData::simuSW() { return _simuSW; }
bool AppData::enableWizard() { return _enableWizard; }
int AppData::backLight() { return _backLight; }
int AppData::embedSplashes() { return _embedSplashes; }
@@ -508,7 +518,6 @@ int AppData::generalEditTab() { return _generalEditTab; }
int AppData::iconSize() { return _iconSize; }
int AppData::historySize() { return _historySize; }
int AppData::jsCtrl() { return _jsCtrl; }
int AppData::modelEditTab() { return _modelEditTab; }
int AppData::id() { return _id; }
int AppData::theme() { return _theme; }
int AppData::warningId() { return _warningId; }
@@ -553,7 +562,6 @@ void AppData::snapToClpbrd (const bool x) { store(x, _snapToClpbrd,
void AppData::autoCheckApp (const bool x) { store(x, _autoCheckApp, "startup_check_companion" );}
void AppData::autoCheckFw (const bool x) { store(x, _autoCheckFw, "startup_check_fw" );}
void AppData::simuSW (const bool x) { store(x, _simuSW, "simuSW" );}
void AppData::enableWizard (const bool x) { store(x, _enableWizard, "wizardEnable" );}
void AppData::backLight (const int x) { store(x, _backLight, "backLight" );}
void AppData::embedSplashes (const int x) { store(x, _embedSplashes, "embedded_splashes" );}
@@ -562,7 +570,6 @@ void AppData::generalEditTab (const int x) { store(x, _generalEditTab,
void AppData::iconSize (const int x) { store(x, _iconSize, "icon_size" );}
void AppData::historySize (const int x) { store(x, _historySize, "history_size" );}
void AppData::jsCtrl (const int x) { store(x, _jsCtrl, "js_ctrl" );}
void AppData::modelEditTab (const int x) { store(x, _modelEditTab, "modelEditTab" );}
void AppData::id (const int x) { store(x, _id, "profileId" );}
void AppData::theme (const int x) { store(x, _theme, "theme" );}
void AppData::warningId (const int x) { store(x, _warningId, "warningId" );}
@@ -620,12 +627,14 @@ AppData::AppData()
settings.remove("default_mode");
settings.remove("firmware");
settings.remove("lastFw");
settings.remove("modelEditTab");
settings.remove("Name");
settings.remove("patchImage");
settings.remove("rename_firmware_files");
settings.remove("sdPath");
settings.remove("SplashFileName");
settings.remove("startup_check_companion9x");
settings.remove("wizardEnable");
// Select the new default profile as current profile
id( 0 );
@@ -671,7 +680,6 @@ AppData::AppData()
getset( _autoCheckApp, "startup_check_companion" ,true );
getset( _autoCheckFw, "startup_check_fw" ,true );
getset( _simuSW, "simuSW" ,false );
getset( _enableWizard, "wizardEnable" ,true );
getset( _backLight, "backLight" ,0 );
getset( _embedSplashes, "embedded_splashes" ,0 );
@@ -680,7 +688,6 @@ AppData::AppData()
getset( _iconSize, "icon_size" ,2 );
getset( _jsCtrl, "js_ctrl" ,0 );
getset( _historySize, "history_size" ,10 );
getset( _modelEditTab, "modelEditTab" ,0 );
getset( _id, "profileId" ,0 );
getset( _theme, "theme" ,1 );
getset( _warningId, "warningId" ,0 );
+13 -6
View File
@@ -1,5 +1,16 @@
// Companion Application Data Class Declaration.
// Author Kjell Kernen
/*
* Author - Kjell Kernen
*
* 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.
*
*/
// All temporary and permanent global variables are defined here to make
// initialization and storage safe and visible.
@@ -225,7 +236,6 @@ class AppData: protected CompStoreObj
bool _autoCheckApp;
bool _autoCheckFw;
bool _simuSW;
bool _enableWizard;
int _backLight;
int _embedSplashes;
@@ -234,7 +244,6 @@ class AppData: protected CompStoreObj
int _iconSize;
int _jsCtrl;
int _historySize;
int _modelEditTab;
int _id;
int _theme;
int _warningId;
@@ -281,7 +290,6 @@ class AppData: protected CompStoreObj
bool autoCheckApp();
bool autoCheckFw();
bool simuSW();
bool enableWizard();
int backLight();
int embedSplashes();
@@ -290,7 +298,6 @@ class AppData: protected CompStoreObj
int iconSize();
int historySize();
int jsCtrl();
int modelEditTab(); // This variable is unused an can be removed
int id();
int theme();
int warningId();
+2 -2
View File
@@ -38,7 +38,6 @@ void appPreferencesDialog::writeValues()
{
g.autoCheckApp(ui->startupCheck_companion9x->isChecked());
g.autoCheckFw(ui->startupCheck_fw->isChecked());
g.enableWizard(ui->wizardEnable_ChkB->isChecked());
g.showSplash(ui->showSplash->isChecked());
g.simuSW(ui->simuSW->isChecked());
g.historySize(ui->historySize->value());
@@ -102,10 +101,11 @@ void appPreferencesDialog::initSettings()
}
ui->startupCheck_companion9x->setChecked(g.autoCheckApp());
ui->startupCheck_fw->setChecked(g.autoCheckFw());
ui->wizardEnable_ChkB->setChecked(g.enableWizard());
ui->showSplash->setChecked(g.showSplash());
ui->historySize->setValue(g.historySize());
ui->backLightColor->setCurrentIndex(g.backLight());
if (getRadioType(g.profile[g.id()].fwType())==6) // TODO - NOT AT ALL OK. THERE SHOULD BE A COMMON RADIO DEFINITION.
ui->backLightColor->setEnabled(false);
ui->simuSW->setChecked(g.simuSW());
ui->libraryPath->setText(g.libDir());
ui->ge_lineedit->setText(g.gePath());
+179 -189
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>499</height>
<width>685</width>
<height>514</height>
</rect>
</property>
<property name="sizePolicy">
@@ -18,7 +18,7 @@
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>685</width>
<height>0</height>
</size>
</property>
@@ -26,21 +26,22 @@
<string>Edit Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<property name="margin">
<number>6</number>
</property>
<item row="2" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
@@ -51,20 +52,14 @@
<string>Radio Profile</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="20" column="1">
<spacer name="verticalSpacer_3">
<item row="10" column="1" colspan="5">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</widget>
</item>
<item row="12" column="1" colspan="3">
<item row="11" column="1" colspan="3">
<widget class="QComboBox" name="stickmodeCB">
<property name="maximumSize">
<size>
@@ -118,7 +113,7 @@ Mode 4:
</item>
</widget>
</item>
<item row="14" column="1" colspan="3">
<item row="13" column="1" colspan="3">
<widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -268,7 +263,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</widget>
</item>
<item row="12" column="0">
<item row="11" column="0">
<widget class="QLabel" name="label_14">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -288,7 +283,20 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="6" column="0">
<item row="16" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -301,7 +309,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="14" column="0">
<item row="13" column="0">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -317,14 +325,14 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="15" column="1" colspan="3">
<item row="14" column="1" colspan="3">
<widget class="QCheckBox" name="renameFirmware">
<property name="text">
<string>Append version number to FW file name</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="3" column="0">
<widget class="QLabel" name="sdPathLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -340,7 +348,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<item row="3" column="1" colspan="2">
<widget class="QLineEdit" name="sdPath">
<property name="enabled">
<bool>true</bool>
@@ -362,28 +370,41 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="16" column="1" colspan="3">
<item row="3" column="4">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="15" column="1" colspan="3">
<widget class="QCheckBox" name="burnFirmware">
<property name="text">
<string>Offer to write FW to Tx after download</string>
</property>
</widget>
</item>
<item row="4" column="5">
<item row="15" column="5">
<widget class="QPushButton" name="removeProfileButton">
<property name="text">
<string>Remove Profile</string>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QPushButton" name="sdPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="11" column="1" colspan="5">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<item row="5" column="1" colspan="2">
<widget class="QLineEdit" name="SplashFileName">
<property name="enabled">
<bool>true</bool>
@@ -405,14 +426,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="9" column="5">
<widget class="QPushButton" name="clearImageButton">
<property name="text">
<string>Clear Image</string>
</property>
</widget>
</item>
<item row="6" column="5">
<item row="5" column="5">
<widget class="QPushButton" name="SplashSelect">
<property name="text">
<string>Select Image</string>
@@ -426,7 +440,14 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="5" column="1" colspan="5">
<item row="8" column="5">
<widget class="QPushButton" name="clearImageButton">
<property name="text">
<string>Clear Image</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="5">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -449,7 +470,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="9" column="1">
<item row="8" column="1">
<widget class="QLabel" name="imageLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -476,7 +497,7 @@ This is used by the templated to determine which channel goes to what number out
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
<number>1</number>
</property>
<property name="text">
<string/>
@@ -525,8 +546,52 @@ This is used by the templated to determine which channel goes to what number out
</item>
</widget>
</item>
<item row="4" column="4">
<spacer name="horizontalSpacer">
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>General Settings</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lblGeneralSettings">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>General Settings Label</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="applicationTab">
<attribute name="title">
<string>Application Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<widget class="QLineEdit" name="ge_lineedit">
<property name="minimumSize">
<size>
<width>350</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="1" colspan="4">
<widget class="Line" name="line_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -538,68 +603,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</spacer>
</item>
<item row="16" column="5">
<widget class="QPushButton" name="removeProfileButton">
<property name="text">
<string>Remove Profile</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="5">
<widget class="Line" name="line_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>General Settings</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lblGeneralSettings">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="applicationTab">
<attribute name="title">
<string>Application Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="9" column="2">
<widget class="QPushButton" name="backupPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="11" column="1" colspan="2">
<widget class="Line" name="line_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="9" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Automatic Backup Folder</string>
@@ -628,7 +632,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="13" column="0">
<item row="12" column="0">
<widget class="QLabel" name="label_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -641,7 +645,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="12" column="1">
<item row="11" column="1">
<widget class="QComboBox" name="splashincludeCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -678,7 +682,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="9" column="1">
<item row="8" column="1">
<widget class="QLineEdit" name="backupPath">
<property name="minimumSize">
<size>
@@ -691,34 +695,21 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="13" column="2">
<item row="12" column="4">
<widget class="QPushButton" name="libraryPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<item row="1" column="1" colspan="4">
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="ge_lineedit">
<property name="minimumSize">
<size>
<width>350</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="4">
<widget class="QPushButton" name="ge_pathButton">
<property name="text">
<string>Find Executable</string>
@@ -738,7 +729,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="12" column="0">
<item row="11" column="0">
<widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -751,14 +742,34 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="10" column="1">
<item row="9" column="1">
<widget class="QCheckBox" name="backupEnable">
<property name="text">
<string>Enable automatic backup before writing firmware</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<item row="8" column="4">
<widget class="QPushButton" name="backupPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="13" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -775,23 +786,13 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="8" column="1" colspan="2">
<item row="7" column="1" colspan="4">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="wizardEnable_ChkB">
<property name="text">
<string>Offer to use wizard for new models</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="showSplash">
<property name="text">
@@ -802,7 +803,20 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="13" column="1">
<item row="0" column="3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="12" column="1">
<widget class="QLineEdit" name="libraryPath">
<property name="enabled">
<bool>true</bool>
@@ -812,19 +826,6 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="14" column="1" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="simulatorTab">
@@ -865,6 +866,19 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="backLightColor">
<property name="maximumSize">
@@ -980,33 +994,10 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
@@ -1017,7 +1008,6 @@ This is used by the templated to determine which channel goes to what number out
<tabstop>showSplash</tabstop>
<tabstop>startupCheck_fw</tabstop>
<tabstop>startupCheck_companion9x</tabstop>
<tabstop>wizardEnable_ChkB</tabstop>
<tabstop>backupPath</tabstop>
<tabstop>backupPathButton</tabstop>
<tabstop>backupEnable</tabstop>
+20 -101
View File
@@ -57,107 +57,26 @@
<file>images/x9r3.png</file>
<file>images/x9s0.png</file>
<file>images/x9t0.png</file>
<file>images/taranison.png</file>
<file>images/mcw/aicon.png</file>
<file>images/mcw/dicon.png</file>
<file>images/mcw/gicon.png</file>
<file>images/mcw/hicon.png</file>
<file>images/mcw/at1e1r.png</file>
<file>images/mcw/at2e1r.png</file>
<file>images/mcw/atailv.png</file>
<file>images/mcw/aw0a0f.png</file>
<file>images/mcw/aw1a0f.png</file>
<file>images/mcw/aw1a1f.png</file>
<file>images/mcw/aw1a2f.png</file>
<file>images/mcw/aw2a0f.png</file>
<file>images/mcw/aw2a1f.png</file>
<file>images/mcw/aw2a2f.png</file>
<file>images/mcw/h90.png</file>
<file>images/mcw/h120.png</file>
<file>images/mcw/h120x.png</file>
<file>images/mcw/h140.png</file>
<file>images/mcw/hfbl.png</file>
<file>images/mcw/htailg.png</file>
<file>images/mcw/htailng.png</file>
<file>images/mcw/htailfblg.png</file>
<file>images/mcw/htailfblng.png</file>
<file>images/mcw/gt1e1r.png</file>
<file>images/mcw/gt2e1r.png</file>
<file>images/mcw/gtailv.png</file>
<file>images/mcw/gw0t0a0f0s.png</file>
<file>images/mcw/gw0t1a0f0s.png</file>
<file>images/mcw/gw0t1a0f1s.png</file>
<file>images/mcw/gw0t1a0f2s.png</file>
<file>images/mcw/gw0t1a1f0s.png</file>
<file>images/mcw/gw0t1a1f1s.png</file>
<file>images/mcw/gw0t1a1f2s.png</file>
<file>images/mcw/gw0t1a2f0s.png</file>
<file>images/mcw/gw0t1a2f1s.png</file>
<file>images/mcw/gw0t1a2f2s.png</file>
<file>images/mcw/gw0t2a0f0s.png</file>
<file>images/mcw/gw0t2a0f1s.png</file>
<file>images/mcw/gw0t2a0f2s.png</file>
<file>images/mcw/gw0t2a1f0s.png</file>
<file>images/mcw/gw0t2a1f1s.png</file>
<file>images/mcw/gw0t2a1f2s.png</file>
<file>images/mcw/gw0t2a2f0s.png</file>
<file>images/mcw/gw0t2a2f1s.png</file>
<file>images/mcw/gw0t2a2f2s.png</file>
<file>images/mcw/gw1t0a0f0s.png</file>
<file>images/mcw/gw1t1a0f0s.png</file>
<file>images/mcw/gw1t1a0f1s.png</file>
<file>images/mcw/gw1t1a0f2s.png</file>
<file>images/mcw/gw1t1a1f0s.png</file>
<file>images/mcw/gw1t1a1f1s.png</file>
<file>images/mcw/gw1t1a1f2s.png</file>
<file>images/mcw/gw1t1a2f0s.png</file>
<file>images/mcw/gw1t1a2f1s.png</file>
<file>images/mcw/gw1t1a2f2s.png</file>
<file>images/mcw/gw1t2a0f0s.png</file>
<file>images/mcw/gw1t2a0f1s.png</file>
<file>images/mcw/gw1t2a0f2s.png</file>
<file>images/mcw/gw1t2a1f0s.png</file>
<file>images/mcw/gw1t2a1f1s.png</file>
<file>images/mcw/gw1t2a1f2s.png</file>
<file>images/mcw/gw1t2a2f0s.png</file>
<file>images/mcw/gw1t2a2f1s.png</file>
<file>images/mcw/gw1t2a2f2s.png</file>
<file>images/mcw/db0t2e0f0r.png</file>
<file>images/mcw/db0t2e0f1r.png</file>
<file>images/mcw/db0t2e0f2r.png</file>
<file>images/mcw/db0t2e1f0r.png</file>
<file>images/mcw/db0t2e1f1r.png</file>
<file>images/mcw/db0t2e1f2r.png</file>
<file>images/mcw/db0t2e2f0r.png</file>
<file>images/mcw/db0t2e2f1r.png</file>
<file>images/mcw/db0t2e2f2r.png</file>
<file>images/mcw/db1t2e0f0r.png</file>
<file>images/mcw/db1t2e0f1r.png</file>
<file>images/mcw/db1t2e0f2r.png</file>
<file>images/mcw/db1t2e1f0r.png</file>
<file>images/mcw/db1t2e1f1r.png</file>
<file>images/mcw/db1t2e1f2r.png</file>
<file>images/mcw/db1t2e2f0r.png</file>
<file>images/mcw/db1t2e2f1r.png</file>
<file>images/mcw/db1t2e2f2r.png</file>
<file>images/mcw/dt0t2e0f0r.png</file>
<file>images/mcw/dt0t2e0f1r.png</file>
<file>images/mcw/dt0t2e0f2r.png</file>
<file>images/mcw/dt0t2e1f0r.png</file>
<file>images/mcw/dt0t2e1f1r.png</file>
<file>images/mcw/dt0t2e1f2r.png</file>
<file>images/mcw/dt0t2e2f0r.png</file>
<file>images/mcw/dt0t2e2f1r.png</file>
<file>images/mcw/dt0t2e2f2r.png</file>
<file>images/mcw/dt1t2e0f0r.png</file>
<file>images/mcw/dt1t2e0f1r.png</file>
<file>images/mcw/dt1t2e0f2r.png</file>
<file>images/mcw/dt1t2e1f0r.png</file>
<file>images/mcw/dt1t2e1f1r.png</file>
<file>images/mcw/dt1t2e1f2r.png</file>
<file>images/mcw/dt1t2e2f0r.png</file>
<file>images/mcw/dt1t2e2f1r.png</file>
<file>images/mcw/dt1t2e2f2r.png</file>
<file>images/taranison.png</file>
<file>images/wizard/ailerons.png</file>
<file>images/wizard/airbrakes.png</file>
<file>images/wizard/bank.png</file>
<file>images/wizard/conclusion.png</file>
<file>images/wizard/cyclic.png</file>
<file>images/wizard/fblheli.png</file>
<file>images/wizard/flaps.png</file>
<file>images/wizard/flybar.png</file>
<file>images/wizard/gyro.png</file>
<file>images/wizard/helictrl.png</file>
<file>images/wizard/models.png</file>
<file>images/wizard/multirotor.png</file>
<file>images/wizard/rudder.png</file>
<file>images/wizard/simpletail.png</file>
<file>images/wizard/tail.png</file>
<file>images/wizard/tails.png</file>
<file>images/wizard/throttle.png</file>
<file>images/wizard/vtail.png</file>
<file>images/wizard/wingtype.png</file>
<file>images/library/00001.png</file>
<file>images/library/00002.png</file>
<file>images/library/00003.png</file>
+41 -14
View File
@@ -8,6 +8,7 @@
#include "firmwares/ersky9x/ersky9xinterface.h"
#include "appdata.h"
#include "helpers.h"
#include "wizarddata.h"
QString EEPROMWarnings;
@@ -909,7 +910,7 @@ GeneralSettings::GeneralSettings()
}
}
RawSource GeneralSettings::getDefaultSource(unsigned int channel)
RawSource GeneralSettings::getDefaultSource(unsigned int channel) const
{
unsigned int stick_index = chout_ar[4*templateSetup + channel] - 1;
return RawSource(SOURCE_TYPE_STICK, stick_index);
@@ -929,6 +930,24 @@ ModelData::ModelData()
clear();
}
ModelData::ModelData(const ModelData & src)
{
*this = src;
}
ModelData & ModelData::operator = (const ModelData & src)
{
memcpy(this, &src, sizeof(ModelData));
for (int i=0; i<C9X_MAX_MIXERS; i++)
mixData[i].srcRaw.model = this;
for (int i=0; i<C9X_MAX_EXPOS; i++)
expoData[i].srcRaw.model = this;
swashRingData.collectiveSource.model = this;
return *this;
}
ExpoData * ModelData::insertInput(const int idx)
{
memmove(&expoData[idx+1], &expoData[idx], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData));
@@ -997,7 +1016,7 @@ bool ModelData::isempty()
return !used;
}
void ModelData::setDefaultMixes(GeneralSettings & settings)
void ModelData::setDefaultInputs(const GeneralSettings & settings)
{
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
for (int i=0; i<NUM_STICKS; i++) {
@@ -1007,22 +1026,30 @@ void ModelData::setDefaultMixes(GeneralSettings & settings)
expo->srcRaw = settings.getDefaultSource(i);
expo->weight = 100;
strncpy(inputNames[i], expo->srcRaw.toString().toLatin1().constData(), sizeof(inputNames[i])-1);
MixData * mix = &mixData[i];
mix->destCh = i+1;
mix->weight = 100;
mix->srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i, this);
}
}
else {
for (int i=0; i<NUM_STICKS; i++) {
mixData[i].destCh = i+1;
mixData[i].srcRaw = RawSource(SOURCE_TYPE_STICK, i);
mixData[i].weight = 100;
}
}
}
void ModelData::setDefaultValues(unsigned int id, GeneralSettings & settings)
void ModelData::setDefaultMixes(const GeneralSettings & settings)
{
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
setDefaultInputs(settings);
}
for (int i=0; i<NUM_STICKS; i++) {
MixData * mix = &mixData[i];
mix->destCh = i+1;
mix->weight = 100;
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
mix->srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i, this);
}
else {
mix->srcRaw = RawSource(SOURCE_TYPE_STICK, i);
}
}
}
void ModelData::setDefaultValues(unsigned int id, const GeneralSettings & settings)
{
clear();
used = true;
+6 -3
View File
@@ -416,7 +416,7 @@ class GeneralSettings {
public:
GeneralSettings();
RawSource getDefaultSource(unsigned int channel);
RawSource getDefaultSource(unsigned int channel) const;
unsigned int version;
unsigned int variant;
@@ -904,6 +904,8 @@ class ScriptData {
class ModelData {
public:
ModelData();
ModelData(const ModelData & src);
ModelData & operator = (const ModelData & src);
ExpoData * insertInput(const int idx);
void removeInput(const int idx);
@@ -963,8 +965,9 @@ class ModelData {
void clear();
bool isempty();
void setDefaultMixes(GeneralSettings & settings);
void setDefaultValues(unsigned int id, GeneralSettings & settings);
void setDefaultInputs(const GeneralSettings & settings);
void setDefaultMixes(const GeneralSettings & settings);
void setDefaultValues(unsigned int id, const GeneralSettings & settings);
int getTrimValue(int phaseIdx, int trimIdx);
void setTrimValue(int phaseIdx, int trimIdx, int value);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Some files were not shown because too many files have changed in this diff Show More