Rev 440 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 440 | Rev 442 | ||
---|---|---|---|
1 | /*************************************************************************** |
1 | /*************************************************************************** |
2 | * Copyright (C) 2008 by Manuel Schrape * |
2 | * Copyright (C) 2008 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 GLOBAL_H |
19 | #ifndef GLOBAL_H |
20 | #define GLOBAL_H |
20 | #define GLOBAL_H |
21 | 21 | ||
22 | #include <QString> |
22 | #include <QString> |
23 | #include <QSize> |
23 | #include <QSize> |
24 | #include <QPoint> |
24 | #include <QPoint> |
25 | #include <QColor> |
25 | #include <QColor> |
26 | #include <QBitArray> |
26 | #include <QBitArray> |
27 | 27 | ||
28 | //copter settings from kopter module |
28 | //copter settings from kopter module |
29 | #include "libMK/Kopter.h" |
29 | #include "libMK/Kopter.h" |
30 | 30 | ||
31 | #include "Parameter_Positions.h" |
31 | #include "Parameter_Positions.h" |
32 | 32 | ||
33 | #ifdef _WIN32_ |
33 | #ifdef _WIN32_ |
34 | static const QString OS_PORT = "COM1"; |
34 | static const QString OS_PORT = "COM1"; |
35 | #else |
35 | #else |
36 | static const QString OS_PORT = "/dev/ttyUSB0"; |
36 | static const QString OS_PORT = "/dev/ttyUSB0"; |
37 | #endif |
37 | #endif |
38 | 38 | ||
39 | //#define _EEEPC_ |
39 | //#define _EEEPC_ |
40 | 40 | ||
41 | #ifdef _EEEPC_ |
41 | #ifdef _EEEPC_ |
42 | static const int MeterSize = 125; |
42 | static const int MeterSize = 125; |
43 | #else |
43 | #else |
44 | static const int MeterSize = 160; |
44 | static const int MeterSize = 160; |
45 | #endif |
45 | #endif |
46 | 46 | ||
47 | // sleep time - time to wait until next command is received |
47 | // sleep time - time to wait until next command is received |
48 | // FIXME: delete this / rewrite to use interrupts, mutex or something elsebetter than timeouts |
48 | // FIXME: delete this / rewrite to use interrupts, mutex or |
- | 49 | // something else better than timeouts |
|
49 | static const int SLEEP = 500000; |
50 | static const int SLEEP = 500000; |
50 | 51 | ||
51 | static const QString QA_NAME = "QMK-Groundstation"; |
52 | static const QString QA_NAME = "QMK-Groundstation"; |
52 | static const QString QA_VERSION_NR = "0.8.7 - own light lib"; |
53 | static const QString QA_VERSION_NR = "0.8.7 - libMK"; |
53 | 54 | ||
54 | #ifdef _BETA_ |
55 | #ifdef _BETA_ |
55 | static const QString QA_VERSION = QA_VERSION_NR + " (BETA)"; |
56 | static const QString QA_VERSION = QA_VERSION_NR + " (BETA)"; |
56 | static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c"; |
57 | static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c"; |
57 | #else |
58 | #else |
58 | static const QString QA_VERSION = QA_VERSION_NR; |
59 | static const QString QA_VERSION = QA_VERSION_NR; |
59 | static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c"; |
60 | static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c"; |
60 | #endif |
61 | #endif |
61 | 62 | ||
62 | #ifdef Q_OS_LINUX |
63 | #ifdef Q_OS_LINUX |
63 | static const QString QA_OS = "Linux"; |
64 | static const QString QA_OS = "Linux"; |
64 | #else |
65 | #else |
65 | #ifdef Q_OS_DARWIN |
66 | #ifdef Q_OS_DARWIN |
66 | static const QString QA_OS = "OSX"; |
67 | static const QString QA_OS = "OSX"; |
67 | #else |
68 | #else |
68 | #ifdef Q_OS_WIN32 |
69 | #ifdef Q_OS_WIN32 |
69 | static const QString QA_OS = "Windows"; |
70 | static const QString QA_OS = "Windows"; |
70 | #else |
71 | #else |
71 | static const QString QA_OS = "n/a"; |
72 | static const QString QA_OS = "n/a"; |
72 | #endif |
73 | #endif |
73 | #endif |
74 | #endif |
74 | #endif |
75 | #endif |
75 | 76 | ||
76 | 77 | ||
77 | static const QString QA_DATE = "13.04.2009"; |
78 | static const QString QA_DATE = "13.04.2009"; |
78 | static const QString QA_YEAR = "2008-2009"; |
79 | static const QString QA_YEAR = "2008-2009"; |
79 | static const QString QA_AUTHOR = "Manuel Schrape"; |
80 | static const QString QA_AUTHOR = "Manuel Schrape"; |
80 | static const QString QA_EMAIL = "manuel.schrape@gmx.de"; |
81 | static const QString QA_EMAIL = "manuel.schrape@gmx.de"; |
81 | 82 | ||
82 | static const QString QA_ABOUT = |
83 | static const QString QA_ABOUT = |
83 | "<HTML>" |
84 | "<HTML>" |
84 | "<p><b><font size=8>" + QA_NAME + "</font></b></p>" |
85 | "<p><b><font size=8>" + QA_NAME + "</font></b></p>" |
85 | "<br />" |
86 | "<br />" |
86 | "Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + "" |
87 | "Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + "" |
87 | "<br /><b>kompatibel zu " + QA_HWVERSION + "</b>" |
88 | "<br /><b>kompatibel zu " + QA_HWVERSION + "</b>" |
88 | "<br /><br />" |
89 | "<br /><br />" |
89 | "(C) " + QA_YEAR + " by " + QA_AUTHOR + " - " |
90 | "(C) " + QA_YEAR + " by " + QA_AUTHOR + " - " |
90 | "<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />" |
91 | "<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />" |
91 | "Groundstation-Programm für den Mikrokopter zum <br>Parametrieren und Debug-Werte anzeigen, aufzeichnen & Visualisieren." |
92 | "Groundstation-Programm für den Mikrokopter zum <br>Parametrieren und Debug-Werte anzeigen, aufzeichnen & Visualisieren." |
92 | "<br /><br /> Dieses Programm wird unter den Bedingungen der GPL v2 veröffentlicht." |
93 | "<br /><br /> Dieses Programm wird unter den Bedingungen der GPL v2 veröffentlicht." |
93 | "</HTML>"; |
94 | "</HTML>"; |
94 | 95 | ||
95 | static const QString Def_AnalogNames[] = {"Integral Nick", "Integral Roll", "ACC Nick", "ACC Roll", "Gyro Gier", "Hoehen-Wert", "ACC Z", "GAS", "Kompass-Value", "Spannung", "Empfang", "Ersatzkompass", "Motor Vorne", "Motor Hinten", "Motor Links", "Motor Rechts", "Analog 16", "Distance", "OSD-Bar", "MK3Mag", "Servo", "Nick", "Roll", "Analog 23", "Analog 24", "Analog 25", "Analog 26", "Kalman Max", "Analog 28", "Kalman K", "GPS Nick", "GPS Roll"}; |
96 | static const QString Def_AnalogNames[] = {"Integral Nick", "Integral Roll", "ACC Nick", "ACC Roll", "Gyro Gier", "Hoehen-Wert", "ACC Z", "GAS", "Kompass-Value", "Spannung", "Empfang", "Ersatzkompass", "Motor Vorne", "Motor Hinten", "Motor Links", "Motor Rechts", "Analog 16", "Distance", "OSD-Bar", "MK3Mag", "Servo", "Nick", "Roll", "Analog 23", "Analog 24", "Analog 25", "Analog 26", "Kalman Max", "Analog 28", "Kalman K", "GPS Nick", "GPS Roll"}; |
96 | 97 | ||
97 | static const QRgb Def_Colors[] = {0x00FF0000, 0x0000FF00, 0x00FFFF00, 0x000000FF, 0x00FF00FF, 0x0000FFFF, 0x00FFFFFF, 0x00660000, 0x00006600, 0x00666600, 0x00000066, 0x00660066, 0x000066, 0x00666666, 0x00990000, 0x00009900, 0x00999900, 0x00000099, 0x00990099, 0x00009999, 0x00999999, 0x00CC0000, 0x0000CC00, 0x00CCCC00, 0x000000CC, 0x00CC00CC, 0x0000CCCC, 0x00CCCCCC, 0x0066FF99, 0x009966FF, 0x00FF9966, 0x0099FF66}; |
98 | static const QRgb Def_Colors[] = {0x00FF0000, 0x0000FF00, 0x00FFFF00, 0x000000FF, 0x00FF00FF, 0x0000FFFF, 0x00FFFFFF, 0x00660000, 0x00006600, 0x00666600, 0x00000066, 0x00660066, 0x000066, 0x00666666, 0x00990000, 0x00009900, 0x00999900, 0x00000099, 0x00990099, 0x00009999, 0x00999999, 0x00CC0000, 0x0000CC00, 0x00CCCC00, 0x000000CC, 0x00CC00CC, 0x0000CCCC, 0x00CCCCCC, 0x0066FF99, 0x009966FF, 0x00FF9966, 0x0099FF66}; |
98 | 99 | ||
99 | //plot informations - see cSettings-constructor. |
100 | //plot informations - see cSettings-constructor. |
100 | static const bool Def_Plot_Show[] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}; |
101 | static const bool Def_Plot_Show[] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}; |
101 | static const bool Def_Log[] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}; |
102 | static const bool Def_Log[] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}; |
102 | 103 | ||
103 | #endif |
104 | #endif |
104 | 105 |