Rev 674 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 674 | Rev 750 | ||
---|---|---|---|
1 | /*************************************************************************** |
1 | /*************************************************************************** |
2 | * Copyright (C) 2009 by Manuel Schrape * |
2 | * Copyright (C) 2009 by Manuel Schrape * |
3 | * manuel.schrape@gmx.de * |
3 | * manuel.schrape@gmx.de * |
4 | * * |
4 | * * |
5 | * This program is free software; you can redistribute it and/or modify * |
5 | * This program is free software; you can redistribute it and/or modify * |
6 | * it under the terms of the GNU General Public License as published by * |
6 | * it under the terms of the GNU General Public License as published by * |
7 | * the Free Software Foundation; either version 2 of the License. * |
7 | * the Free Software Foundation; either version 2 of the License. * |
8 | * * |
8 | * * |
9 | * This program is distributed in the hope that it will be useful, * |
9 | * This program is distributed in the hope that it will be useful, * |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
12 | * GNU General Public License for more details. * |
12 | * GNU General Public License for more details. * |
13 | * * |
13 | * * |
14 | * You should have received a copy of the GNU General Public License * |
14 | * You should have received a copy of the GNU General Public License * |
15 | * along with this program; if not, write to the * |
15 | * along with this program; if not, write to the * |
16 | * Free Software Foundation, Inc., * |
16 | * Free Software Foundation, Inc., * |
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
18 | ***************************************************************************/ |
18 | ***************************************************************************/ |
19 | #ifndef DLG_MAIN_H |
19 | #ifndef DLG_MAIN_H |
20 | #define DLG_MAIN_H |
20 | #define DLG_MAIN_H |
21 | 21 | ||
22 | #include <QtGui/QMainWindow> |
22 | #include <QtGui/QMainWindow> |
23 | #include <QTcpServer> |
23 | #include <QTcpServer> |
24 | #include <QTcpSocket> |
24 | #include <QTcpSocket> |
25 | #include <QComboBox> |
25 | #include <QComboBox> |
26 | #include <QToolButton> |
26 | #include <QToolButton> |
27 | #include <QTimer> |
27 | #include <QTimer> |
28 | 28 | ||
29 | #include "ui_dlg_Main.h" |
29 | #include "ui_dlg_Main.h" |
30 | 30 | ||
31 | #include "dlg_MotorMixer.h" |
31 | #include "dlg_MotorMixer.h" |
- | 32 | #include "dlg_MotorTest.h" |
|
32 | 33 | ||
33 | #include "../Defines.h" |
34 | #include "../Defines.h" |
34 | #include "../TypeDefs.h" |
35 | #include "../TypeDefs.h" |
35 | 36 | ||
36 | #include "../Classes/cSettings.h" |
37 | #include "../Classes/cSettings.h" |
37 | - | ||
38 | #include "../../Global/Kopter.h" |
- | |
39 | #include "../../Global/MK_Datatypes.h" |
- | |
40 | #include "../../Global/Class_Input/Input.h" |
- | |
41 | #include "../../Global/Class_Input/Input_TCP.h" |
- | |
42 | #include "../../Global/Class_Input/Input_TTY.h" |
- | |
43 | #include "../../Global/Class_HandlerIP/HandlerIP.h" |
- | |
44 | #include "../../Global/Class_HandlerMK/HandlerMK.h" |
- | |
45 | 38 | ||
46 | class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI |
39 | class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI |
47 | { |
40 | { |
48 | Q_OBJECT |
41 | Q_OBJECT |
49 | 42 | ||
50 | public: |
43 | public: |
51 | dlg_Main(); |
44 | dlg_Main(); |
52 | ~dlg_Main(); |
45 | ~dlg_Main(); |
53 | 46 | ||
54 | private: |
47 | private: |
55 | QTimer *o_Timer; |
48 | QTimer *o_Timer; |
56 | - | ||
57 | // Input Device. |
- | |
58 | Input *o_Input; |
- | |
59 | 49 | ||
60 | // Info über die Hardware |
50 | // Info über die Hardware |
61 | s_Hardware VersionInfo; |
51 | s_Hardware gs_Version; |
62 | 52 | ||
63 | // Settings-Object |
53 | // Settings-Object |
64 | cSettings *o_Settings; |
54 | cSettings *o_Settings; |
65 | 55 | ||
66 | // MotorMixer GUI |
56 | // MotorMixer GUI |
67 | dlg_MotorMixer *f_MotorMixer; |
57 | dlg_MotorMixer *f_MotorMixer; |
- | 58 | ||
- | 59 | // MotorTest GUI |
|
- | 60 | dlg_MotorTest *f_MotorTest; |
|
68 | 61 | ||
69 | char c_Data[150]; |
62 | char c_Data[150]; |
70 | 63 | ||
71 | // Programm-Initialisirungen |
64 | // Programm-Initialisirungen |
72 | void init_GUI(); |
65 | void init_GUI(); |
73 | void init_Connections(); |
66 | void init_Connections(); |
74 | 67 | ||
75 | void init_Directorys(); |
68 | void init_Directorys(); |
76 | s_Directorys s_Dir; |
69 | s_Directorys s_Dir; |
77 | - | ||
78 | // Einkommende Datenpackete zerlegen. |
- | |
79 | void parse_MK_Data(QString t_Data); |
- | |
80 | void parse_IP_Data(QString t_Data); |
- | |
81 | 70 | ||
82 | void set_LED(QToolButton *ToolButton, bool On = false); |
71 | void set_LED(QToolButton *ToolButton, bool On = false); |
83 | int get_Value(QComboBox *Combo); |
72 | int get_Value(QComboBox *Combo); |
84 | QComboBox *setCombo(QComboBox *Combo, int Wert); |
73 | QComboBox *setCombo(QComboBox *Combo, int Wert); |
85 | 74 | ||
86 | void show_MK_Settings(s_MK_Settings t_Set); |
75 | void show_MK_Settings(s_MK_Settings t_Set); |
87 | s_MK_Settings get_MK_Settings(); |
76 | s_MK_Settings get_MK_Settings(); |
88 | 77 | ||
89 | private slots: |
78 | private slots: |
90 | void slot_Timer(); |
79 | void slot_Timer(); |
91 | 80 | ||
92 | void slot_ac_About(); |
81 | void slot_ac_About(); |
- | 82 | void slot_ac_Toolbar(); |
|
- | 83 | ||
- | 84 | void slot_ConnectionStatus(int li_Status); |
|
- | 85 | void slot_MK_Version(s_Hardware ls_Version); |
|
93 | 86 | void slot_MK_ReadSettings(s_MK_Settings ps_MK_Settings); |
|
- | 87 | void slot_MK_WriteSettings(int pi_ID); |
|
- | 88 | void slot_MK_ReadMotorMixer(s_MK_Mixer ps_MK_MotorMixer); |
|
- | 89 | void slot_MK_WriteMotorMixer(int pi_ID); |
|
94 | void slot_ac_Connect(); |
90 | void slot_MK_PPMData(s_MK_PPM_Data ps_PPMData); |
95 | 91 | ||
96 | void slot_ac_Write(); |
92 | void slot_ac_Write(); |
97 | void slot_ac_Read(); |
93 | void slot_ac_Read(); |
98 | void slot_ac_Save(); |
94 | void slot_ac_Save(); |
99 | void slot_ac_Load(); |
95 | void slot_ac_Load(); |
100 | 96 | ||
101 | void slot_ac_MotorMixer(); |
97 | void slot_ac_MotorMixer(); |
- | 98 | void slot_ac_MotorTest(); |
|
102 | 99 | ||
103 | void slot_PageChange(int Page); |
100 | void slot_PageChange(int Page); |
104 | - | ||
105 | // Einkommende Datenpackete. |
- | |
106 | void slot_Input_Data(QString t_Data); |
- | |
107 | void slot_Input_Disconnected(int Error); |
- | |
108 | void slot_Input_Connected(); |
- | |
109 | 101 | ||
110 | void slot_LEDtoValue(); |
102 | void slot_LEDtoValue(); |
111 | void slot_ValuetoLED16(int Wert); |
103 | void slot_ValuetoLED16(int Wert); |
112 | void slot_ValuetoLED17(int Wert); |
104 | void slot_ValuetoLED17(int Wert); |
113 | void slot_ValuetoLED16A(int Wert); |
105 | void slot_ValuetoLED16A(int Wert); |
114 | void slot_ValuetoLED17A(int Wert); |
106 | void slot_ValuetoLED17A(int Wert); |
115 | 107 | ||
116 | void slot_tbUp(); |
108 | void slot_tbUp(); |
117 | void slot_tbDown(); |
109 | void slot_tbDown(); |
118 | void slot_tbLeft(); |
110 | void slot_tbLeft(); |
119 | void slot_tbRight(); |
111 | void slot_tbRight(); |
120 | }; |
112 | }; |
121 | 113 | ||
122 | #endif // DLG_MAIN_H |
114 | #endif // DLG_MAIN_H |
123 | 115 |