Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 162 → Rev 163

/QMK-Groundstation/trunk/Forms/dlg_Config.h
32,13 → 32,14
 
~dlg_Config();
 
void set_Settings(cSettings *Set, int ID = 0);
cSettings *get_Settings();
 
private:
cSettings *Settings;
QCheckBox *cb_Plot[MaxAnalog];
QCheckBox *cb_Log[MaxAnalog];
 
 
void set_Settings(cSettings *Set, int ID = 0);
cSettings *get_Settings();
};
 
#endif
/QMK-Groundstation/trunk/Forms/dlg_Preferences.cpp
21,9 → 21,49
dlg_Preferences::dlg_Preferences(QWidget *parent) : QDialog(parent)
{
setupUi(this);
connect(pb_DIR_CVS, SIGNAL(clicked()), this, SLOT(slot_DIR_CVS()));
connect(pb_DIR_SET, SIGNAL(clicked()), this, SLOT(slot_DIR_SET()));
}
 
void dlg_Preferences::set_Settings(cSettings *Set)
{
Settings = Set;
 
le_DIR_CVS->setText(Settings->DIR.Logging);
le_DIR_SET->setText(Settings->DIR.Parameter);
}
 
cSettings *dlg_Preferences::get_Settings()
{
return Settings;
}
 
// Configuration -> Verzeichnisse
/////////////////////////////////
void dlg_Preferences::slot_DIR_CVS()
{
QString directory = QFileDialog::getExistingDirectory(this, "Verzeichniss fuer CSV-Logdateien", Settings->DIR.Logging, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
 
if ((!directory.isEmpty()) && (Settings->DIR.Logging != directory))
{
Settings->DIR.Logging = directory;
le_DIR_CVS->setText(Settings->DIR.Logging);
// Settings->write_Settings();
}
}
 
void dlg_Preferences::slot_DIR_SET()
{
QString directory = QFileDialog::getExistingDirectory(this, "Verzeichniss fuer Settings-Dateien", Settings->DIR.Parameter, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
 
if ((!directory.isEmpty()) && (Settings->DIR.Parameter != directory))
{
Settings->DIR.Parameter = directory;
le_DIR_SET->setText(Settings->DIR.Parameter);
// Settings->write_Settings();
}
 
}
dlg_Preferences::~dlg_Preferences()
{
}
/QMK-Groundstation/trunk/Forms/dlg_Preferences.h
20,17 → 20,30
#define DLG_PREFERENCES_H
 
#include <QCheckBox>
#include <QFileDialog>
 
#include "ui_dlg_Preferences.h"
//#include "../cSettings.h"
#include "../cSettings.h"
//#include "../global.h"
 
class dlg_Preferences : public QDialog, public Ui::dlg_Preferences_UI
{
public:
dlg_Preferences(QWidget *parent = 0);
Q_OBJECT
 
~dlg_Preferences();
public:
dlg_Preferences(QWidget *parent = 0);
 
~dlg_Preferences();
 
void set_Settings(cSettings *Set);
cSettings *get_Settings();
 
private:
cSettings *Settings;
 
private slots:
void slot_DIR_CVS();
void slot_DIR_SET();
};
 
#endif
/QMK-Groundstation/trunk/Forms/dlg_Preferences.ui
5,125 → 5,15
<rect>
<x>0</x>
<y>0</y>
<width>239</width>
<height>274</height>
<width>388</width>
<height>317</height>
</rect>
</property>
<property name="windowTitle" >
<string>Einstellungen</string>
</property>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Debug-Daten</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Intervall langsam :</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sp_Debug_Slow" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>500</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Intervall schnell :</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="sp_Debug_Fast" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="checkBox" >
<property name="text" >
<string>Beim Beenden abschalten</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QCheckBox" name="checkBox_2" >
<property name="text" >
<string>Debug-Texte immer neueinlesen</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Plotter</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Angezeigte Datensätze :</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sp_Plotter_Count" >
<property name="minimum" >
<number>50</number>
</property>
<property name="maximum" >
<number>250</number>
</property>
<property name="singleStep" >
<number>5</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<spacer>
154,9 → 44,201
</item>
</layout>
</item>
<item row="0" column="0" >
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>0</number>
</property>
<widget class="QWidget" name="tab" >
<attribute name="title" >
<string>Analog-Daten</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Debug-Daten</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Intervall langsam :</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sp_Debug_Slow" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>500</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Intervall schnell :</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="sp_Debug_Fast" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="checkBox" >
<property name="text" >
<string>Beim Beenden abschalten</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QCheckBox" name="checkBox_2" >
<property name="text" >
<string>Debug-Texte immer neueinlesen</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Plotter</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Angezeigte Datensätze :</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sp_Plotter_Count" >
<property name="minimum" >
<number>50</number>
</property>
<property name="maximum" >
<number>250</number>
</property>
<property name="singleStep" >
<number>5</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<string>Verzeichnisse</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3" >
<item>
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>Verzeichniss für CVS-Dateien (Datenrecorder)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QLineEdit" name="le_DIR_CVS" />
</item>
<item>
<widget class="QPushButton" name="pb_DIR_CVS" >
<property name="text" >
<string>Verzeichniss auswählen</string>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/22X22/folder-print.png</normaloff>:/Actions/Images/22X22/folder-print.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<string>Verzeichniss für Setting-Dateien</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QLineEdit" name="le_DIR_SET" />
</item>
<item>
<widget class="QPushButton" name="pb_DIR_SET" >
<property name="text" >
<string>Verzeichniss auswählen</string>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/22X22/folder.png</normaloff>:/Actions/Images/22X22/folder.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../MKTool.qrc" />
</resources>
<connections>
<connection>
<sender>okButton</sender>
/QMK-Groundstation/trunk/Forms/mktool.cpp
162,9 → 162,6
connect(ac_ConnectTTY, SIGNAL(triggered()), this, SLOT(slot_OpenPort()));
connect(ac_RecordCSV, SIGNAL(triggered()), this, SLOT(slot_RecordCSV()));
 
connect(ac_LogDir, SIGNAL(triggered()), this, SLOT(slot_SetLogDir()));
connect(ac_ParameterDir, SIGNAL(triggered()), this, SLOT(slot_SetParDir()));
 
// Timer-Events
connect(Ticker, SIGNAL(timeout()), SLOT(slot_Ticker()));
 
371,30 → 368,17
Settings = f_Config->get_Settings();
Settings->write_Settings_Analog(Mode.ID);
 
for (int a = 0; a < MaxAnalog; a++)
// Plotter neu einrichten
if (Old_Analog1.PlotView != Settings->Analog1.PlotView)
{
if (Old_Analog1.PlotView[a] == Settings->Analog1.PlotView[a])
continue;
else
{
config_Plot();
break;
}
config_Plot();
}
 
if (CSVFile->isOpen())
// CVS-Datei neu anlegen.
if ((CSVFile->isOpen()) && (Old_Analog1.LogView != Settings->Analog1.LogView))
{
for (int a = 0; a < MaxAnalog; a++)
{
if (Old_Analog1.LogView[a] == Settings->Analog1.LogView[a])
continue;
else
{
slot_RecordCSV();
slot_RecordCSV();
break;
}
}
slot_RecordCSV();
slot_RecordCSV();
}
 
}
404,9 → 388,12
{
dlg_Preferences *f_Preferences = new dlg_Preferences(this);
 
f_Preferences->set_Settings(Settings);
 
if (f_Preferences->exec()==QDialog::Accepted)
{
 
Settings = f_Preferences->get_Settings();
Settings->write_Settings();
}
}
 
569,32 → 556,7
qDebug("Shell");
}
 
// Configuration -> Verzeichnisse
/////////////////////////////////
void MKTool::slot_SetLogDir()
{
QString directory = QFileDialog::getExistingDirectory(this, "Verzeichniss für CSV-Logdateien", Settings->DIR.Logging, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
 
if ((!directory.isEmpty()) && (Settings->DIR.Logging != directory))
{
Settings->DIR.Logging = directory;
Settings->write_Settings();
}
}
 
void MKTool::slot_SetParDir()
{
QString directory = QFileDialog::getExistingDirectory(this, "Verzeichniss für Parameter-Dateien", Settings->DIR.Parameter, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
 
if ((!directory.isEmpty()) && (Settings->DIR.Parameter != directory))
{
Settings->DIR.Parameter = directory;
Settings->write_Settings();
}
 
}
 
 
// Settings-Bereich
///////////////////
 
1506,29 → 1468,26
////////////////////
void MKTool::write_Settings()
{
QBitArray TabViews(6);
TabViews.setBit(0, ac_View0->isChecked());
TabViews.setBit(1, ac_View1->isChecked());
TabViews.setBit(2, ac_View2->isChecked());
TabViews.setBit(3, ac_View3->isChecked());
TabViews.setBit(4, ac_View4->isChecked());
TabViews.setBit(5, ac_View5->isChecked());
// QBitArray TabViews(6);
Settings->GUI.TabViews.setBit(0, ac_View0->isChecked());
Settings->GUI.TabViews.setBit(1, ac_View1->isChecked());
Settings->GUI.TabViews.setBit(2, ac_View2->isChecked());
Settings->GUI.TabViews.setBit(3, ac_View3->isChecked());
Settings->GUI.TabViews.setBit(4, ac_View4->isChecked());
Settings->GUI.TabViews.setBit(5, ac_View5->isChecked());
 
Settings->GUI.Term_Info = cb_ShowMSG->isChecked();
Settings->GUI.Term_Data = cb_ShowData->isChecked();
Settings->GUI.Term_Always = cb_ShowAlways->isChecked();
 
Settings->TTY.Port = le_Port->text();
 
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("Port");
Setting.setValue("TTY", le_Port->text());
Setting.endGroup();
 
Setting.beginGroup("GUI");
Setting.setValue("IsMax", isMaximized());
Setting.setValue("Size", size());
Setting.setValue("Point", pos());
Setting.setValue("TabViews", QBitArray(TabViews));
Setting.endGroup();
}
 
1700,7 → 1659,7
if (ToolBox::Decode64(RX, true))
{
int Position = RX.Decode[0];
if (Position < 32)
if (Position != 31)
{
Settings->Analog1.Label[Position] = ToolBox::Data2QString(RX.Decode,1,17).trimmed();
Position ++;
1713,6 → 1672,7
{
lb_Analog[a]->setText(Settings->Analog1.Label[a]);
}
Settings->Analog1.Version = Mode.Version;
Settings->write_Settings_AnalogLabels(HardwareID);
config_Plot();
}
1801,8 → 1761,14
// "Keine Verbindung zur FlightCtrl. \nParameterbearbeitung nicht moeglich.", QMessageBox::Ok);
}
 
Settings->read_Settings_Analog(HardwareID);
Settings->read_Settings_AnalogLabels(HardwareID);
Settings->read_Settings_Analog(HardwareID);
 
if (Settings->Analog1.Version != Mode.Version)
{
slot_ac_GetLabels();
}
else
for (int a = 0; a < MaxAnalog; a++)
{
lb_Analog[a]->setText(Settings->Analog1.Label[a]);
1951,7 → 1917,4
{
CSVFile->close();
}
 
// close();
}
 
/QMK-Groundstation/trunk/Forms/mktool.h
180,9 → 180,6
void slot_SetParameter();
void slot_LoadParameter();
void slot_SaveParameter();
 
void slot_SetLogDir();
void slot_SetParDir();
};
 
#endif
/QMK-Groundstation/trunk/Forms/mktool.ui
6023,17 → 6023,9
<property name="title" >
<string>&amp;Einstellungen</string>
</property>
<widget class="QMenu" name="menuVerzeichnisse" >
<property name="title" >
<string>Verzeichnisse</string>
</property>
<addaction name="ac_LogDir" />
<addaction name="ac_ParameterDir" />
</widget>
<addaction name="ac_Config" />
<addaction name="separator" />
<addaction name="ac_Preferences" />
<addaction name="separator" />
<addaction name="menuVerzeichnisse" />
</widget>
<widget class="QMenu" name="menu_Help" >
<property name="title" >
6169,7 → 6161,7
<normaloff>:/Actions/Images/22X22/configure.png</normaloff>:/Actions/Images/22X22/configure.png</iconset>
</property>
<property name="text" >
<string>Datenfelder</string>
<string>Datenfelder wählwn</string>
</property>
</action>
<action name="ac_MehrDaten" >
6261,7 → 6253,7
<normaloff>:/Actions/Images/22X22/configure.png</normaloff>:/Actions/Images/22X22/configure.png</iconset>
</property>
<property name="text" >
<string>Allgemein</string>
<string>QMK Einrichten</string>
</property>
</action>
<action name="ac_Motortest" >
/QMK-Groundstation/trunk/Images/22X22/folder-print.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/QMK-Groundstation/trunk/Images/22X22/folder-print.png
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/trunk/Images/22X22/folder.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/QMK-Groundstation/trunk/Images/22X22/folder.png
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/trunk/ChangeLog.txt
49,3 → 49,17
* Speicherung der Analognamen / Einstellungen der Datenfelder für FC / NC /
MK3MAG getrennt.
 
#######################################
# 08.12.2008 * Version 0.5.6h -> 0.5.6m
 
BugFix:
=======
* Fehler bei Analoglabel-Anforderung beseitigt. (Letzte Label wurde immer wieder
neu angefordert.
 
Änderungen:
===========
* Version der Firmeware wird bei den Analoglabels mit abgespeichert. Wenn Versionen
unterschiedlich sind, werden Labels automatisch neu abgefragt.
* Einstellung der Verzeichnisse jetzt über den Einstellungs-Dialog.
 
/QMK-Groundstation/trunk/MKTool.qrc
15,6 → 15,8
<file>Images/32X32/arrow-up.png</file>
</qresource>
<qresource prefix="Actions" >
<file>Images/22X22/folder.png</file>
<file>Images/22X22/folder-print.png</file>
<file>Images/22X22/clock.png</file>
<file>Images/22X22/configure.png</file>
<file>Images/22X22/application-exit.png</file>
/QMK-Groundstation/trunk/cSettings.cpp
93,6 → 93,7
QSettings Setting("KeyOz-Net", "QMK-Groundstation-Labels");
 
Setting.beginGroup("Analog-Labels-" + Hardware);
Setting.setValue("Version", Analog1.Version);
for (int a=0; a<MaxAnalog; a++)
{
Setting.setValue("Label_" + QString("%1").arg(a), Analog1.Label[a]);
107,6 → 108,7
QSettings Setting("KeyOz-Net", "QMK-Groundstation-Labels");
 
Setting.beginGroup("Analog-Labels-" + Hardware);
Analog1.Version = Setting.value(("Version"), "0").toString();
for (int a=0; a<MaxAnalog; a++)
{
Analog1.Label[a] = Setting.value(("Label_" + QString("%1").arg(a)), Def_AnalogNames[a]).toString();
158,7 → 160,7
Setting.endGroup();
 
Setting.beginGroup("Port");
// Setting.setValue("TTY", le_Port->text());
Setting.setValue("TTY", TTY.Port);
Setting.endGroup();
 
Setting.beginGroup("Dirs");
170,6 → 172,7
Setting.setValue("Terminal_Info", GUI.Term_Info);
Setting.setValue("Terminal_Data", GUI.Term_Data);
Setting.setValue("Terminal_Always", GUI.Term_Always);
Setting.setValue("TabViews", QBitArray(GUI.TabViews));
Setting.endGroup();
}
 
/QMK-Groundstation/trunk/cSettings.h
45,6 → 45,7
 
struct set_Analog
{
QString Version;
QString Label[MaxAnalog];
QBitArray PlotView;
QBitArray LogView;
/QMK-Groundstation/trunk/global.h
40,8 → 40,8
static const int SETTINGS_ID = 2;
 
static const QString QA_NAME = "QMK-Groundstation";
static const QString QA_VERSION = "0.5.6h";
static const QString QA_DATE = "06.12.2008";
static const QString QA_VERSION = "0.5.6m";
static const QString QA_DATE = "08.12.2008";
static const QString QA_YEAR = "2008";
static const QString QA_AUTHOR = "Manuel Schrape";
static const QString QA_EMAIL = "manuel.schrape@gmx.de";