mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Simulator updated with last Kjell improvements
This commit is contained in:
parent
5842bc8473
commit
08245aade9
5 changed files with 383 additions and 383 deletions
|
@ -96,7 +96,7 @@ include_directories(
|
|||
add_subdirectory(modeledit)
|
||||
add_subdirectory(simulation)
|
||||
|
||||
SET( companion_SRCS
|
||||
set(companion_SRCS
|
||||
eeprominterface.cpp
|
||||
hexinterface.cpp
|
||||
flashinterface.cpp
|
||||
|
@ -142,12 +142,12 @@ SET( companion_SRCS
|
|||
downloaddialog.cpp
|
||||
splashlibrary.cpp
|
||||
mainwindow.cpp
|
||||
main.cpp
|
||||
companion.cpp
|
||||
modelconfigdialog.cpp
|
||||
qcustomplot.cpp
|
||||
)
|
||||
|
||||
SET( companion_MOC_HDRS
|
||||
set(companion_MOC_HDRS
|
||||
avroutputdialog.h
|
||||
apppreferencesdialog.h
|
||||
fwpreferencesdialog.h
|
||||
|
@ -171,7 +171,7 @@ SET( companion_MOC_HDRS
|
|||
helpers.h
|
||||
)
|
||||
|
||||
SET( companion_UIS
|
||||
set(companion_UIS
|
||||
mdichild.ui
|
||||
avroutputdialog.ui
|
||||
comparedialog.ui
|
||||
|
@ -190,7 +190,7 @@ SET( companion_UIS
|
|||
modelconfigdialog.ui
|
||||
)
|
||||
|
||||
SET( companion_RCS
|
||||
set(companion_RCS
|
||||
companion.qrc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/translations.qrc
|
||||
)
|
||||
|
@ -316,7 +316,8 @@ set(simu_SRCS
|
|||
file.cpp # TODO not needed
|
||||
modeledit/node.cpp
|
||||
modeledit/edge.cpp # TODO not needed
|
||||
simulation/main.cpp
|
||||
appdata.cpp
|
||||
simulator.cpp
|
||||
)
|
||||
|
||||
set(simu_HDRS
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#include "appdata.h"
|
||||
|
||||
// Global data and storage object
|
||||
AppData g;
|
||||
|
||||
// ** CompStoreObj class********************
|
||||
void CompStoreObj::clear (const QString tag1, const QString tag2, const QString tag3)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
class CompStoreObj
|
||||
{
|
||||
public:
|
||||
public:
|
||||
void clear (const QString tag1="", const QString tag2="", const QString tag3="");
|
||||
void store(const QByteArray newArray, QByteArray &array, const QString tag, const QString group1="", const QString group2="" );
|
||||
void store(const QStringList newSList, QStringList &stringList, const QString tag, const QString group1="", const QString group2="" );
|
||||
|
@ -44,17 +44,17 @@ public:
|
|||
void getset( int &number, const QString tag, const int def, const QString group1="", const QString group2="" );
|
||||
};
|
||||
|
||||
class FwRevision:protected CompStoreObj
|
||||
class FwRevision: protected CompStoreObj
|
||||
{
|
||||
public:
|
||||
public:
|
||||
int get( const QString);
|
||||
void set( const QString, const int );
|
||||
void remove( const QString );
|
||||
};
|
||||
|
||||
class JStickData:protected CompStoreObj
|
||||
class JStickData: protected CompStoreObj
|
||||
{
|
||||
private:
|
||||
private:
|
||||
int index;
|
||||
|
||||
int _stickAxe;
|
||||
|
@ -63,7 +63,7 @@ private:
|
|||
int _stickMax;
|
||||
int _stickInv;
|
||||
|
||||
public:
|
||||
public:
|
||||
// All the get definitions
|
||||
int stick_axe();
|
||||
int stick_min();
|
||||
|
@ -85,9 +85,9 @@ public:
|
|||
void flush();
|
||||
};
|
||||
|
||||
class Profile:protected CompStoreObj
|
||||
class Profile: protected CompStoreObj
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Class Internal Variable
|
||||
int index;
|
||||
|
||||
|
@ -116,7 +116,7 @@ private:
|
|||
int _vBatCalib;
|
||||
int _vBatWarn;
|
||||
|
||||
public:
|
||||
public:
|
||||
// All the get definitions
|
||||
QString firmware();
|
||||
QString name();
|
||||
|
@ -172,15 +172,15 @@ public:
|
|||
void flush();
|
||||
};
|
||||
|
||||
class AppData:protected CompStoreObj
|
||||
class AppData: protected CompStoreObj
|
||||
{
|
||||
// All the global variables
|
||||
public:
|
||||
public:
|
||||
Profile profile[MAX_PROFILES];
|
||||
JStickData joystick[MAX_JOYSTICKS];
|
||||
FwRevision fwRev;
|
||||
|
||||
private:
|
||||
private:
|
||||
QStringList _recentFiles;
|
||||
QByteArray _mainWinGeo;
|
||||
QByteArray _mainWinState;
|
||||
|
@ -235,8 +235,7 @@ private:
|
|||
int _theme;
|
||||
int _warningId;
|
||||
|
||||
|
||||
public:
|
||||
public:
|
||||
// All the get definitions
|
||||
QStringList recentFiles();
|
||||
QByteArray mainWinGeo();
|
||||
|
|
|
@ -74,9 +74,6 @@ class MyProxyStyle : public QProxyStyle
|
|||
};
|
||||
#endif
|
||||
|
||||
// Global data and storge object
|
||||
AppData g;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(companion);
|
Loading…
Add table
Add a link
Reference in a new issue