Rev 440 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
158 | KeyOz | 1 | /*************************************************************************** |
2 | * Copyright (C) 2008 by Manuel Schrape * |
||
3 | * manuel.schrape@gmx.de * |
||
4 | * * |
||
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 * |
||
7 | * the Free Software Foundation; either version 2 of the License. * |
||
8 | * * |
||
9 | * This program is distributed in the hope that it will be useful, * |
||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
12 | * GNU General Public License for more details. * |
||
13 | * * |
||
14 | * You should have received a copy of the GNU General Public License * |
||
15 | * along with this program; if not, write to the * |
||
16 | * Free Software Foundation, Inc., * |
||
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
18 | ***************************************************************************/ |
||
19 | #ifndef GLOBAL_H |
||
20 | #define GLOBAL_H |
||
21 | |||
22 | #include <QString> |
||
23 | #include <QSize> |
||
24 | #include <QPoint> |
||
25 | #include <QColor> |
||
26 | #include <QBitArray> |
||
27 | |||
391 | Brean | 28 | //copter settings from kopter module |
440 | Brean | 29 | #include "libMK/Kopter.h" |
391 | Brean | 30 | |
158 | KeyOz | 31 | #include "Parameter_Positions.h" |
32 | |||
227 | KeyOz | 33 | #ifdef _WIN32_ |
34 | static const QString OS_PORT = "COM1"; |
||
35 | #else |
||
36 | static const QString OS_PORT = "/dev/ttyUSB0"; |
||
37 | #endif |
||
38 | |||
39 | //#define _EEEPC_ |
||
40 | |||
41 | #ifdef _EEEPC_ |
||
42 | static const int MeterSize = 125; |
||
43 | #else |
||
44 | static const int MeterSize = 160; |
||
45 | #endif |
||
46 | |||
391 | Brean | 47 | // sleep time - time to wait until next command is received |
442 | Brean | 48 | // FIXME: delete this / rewrite to use interrupts, mutex or |
49 | // something else better than timeouts |
||
227 | KeyOz | 50 | static const int SLEEP = 500000; |
199 | KeyOz | 51 | |
398 | Brean | 52 | static const QString QA_NAME = "QMK-Groundstation"; |
442 | Brean | 53 | static const QString QA_VERSION_NR = "0.8.7 - libMK"; |
398 | Brean | 54 | |
234 | KeyOz | 55 | #ifdef _BETA_ |
246 | KeyOz | 56 | static const QString QA_VERSION = QA_VERSION_NR + " (BETA)"; |
334 | KeyOz | 57 | static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c"; |
234 | KeyOz | 58 | #else |
246 | KeyOz | 59 | static const QString QA_VERSION = QA_VERSION_NR; |
337 | KeyOz | 60 | static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c"; |
234 | KeyOz | 61 | #endif |
246 | KeyOz | 62 | |
305 | KeyOz | 63 | #ifdef Q_OS_LINUX |
64 | static const QString QA_OS = "Linux"; |
||
65 | #else |
||
66 | #ifdef Q_OS_DARWIN |
||
67 | static const QString QA_OS = "OSX"; |
||
68 | #else |
||
69 | #ifdef Q_OS_WIN32 |
||
70 | static const QString QA_OS = "Windows"; |
||
71 | #else |
||
72 | static const QString QA_OS = "n/a"; |
||
73 | #endif |
||
74 | #endif |
||
75 | #endif |
||
76 | |||
77 | |||
361 | KeyOz | 78 | static const QString QA_DATE = "13.04.2009"; |
199 | KeyOz | 79 | static const QString QA_YEAR = "2008-2009"; |
158 | KeyOz | 80 | static const QString QA_AUTHOR = "Manuel Schrape"; |
81 | static const QString QA_EMAIL = "manuel.schrape@gmx.de"; |
||
82 | |||
83 | static const QString QA_ABOUT = |
||
84 | "<HTML>" |
||
85 | "<p><b><font size=8>" + QA_NAME + "</font></b></p>" |
||
86 | "<br />" |
||
305 | KeyOz | 87 | "Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + "" |
246 | KeyOz | 88 | "<br /><b>kompatibel zu " + QA_HWVERSION + "</b>" |
158 | KeyOz | 89 | "<br /><br />" |
90 | "(C) " + QA_YEAR + " by " + QA_AUTHOR + " - " |
||
91 | "<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />" |
||
92 | "Groundstation-Programm für den Mikrokopter zum <br>Parametrieren und Debug-Werte anzeigen, aufzeichnen & Visualisieren." |
||
93 | "<br /><br /> Dieses Programm wird unter den Bedingungen der GPL v2 veröffentlicht." |
||
94 | "</HTML>"; |
||
95 | |||
162 | KeyOz | 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"}; |
158 | KeyOz | 97 | |
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}; |
||
99 | |||
440 | Brean | 100 | //plot informations - see cSettings-constructor. |
158 | KeyOz | 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}; |
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}; |
||
103 | |||
104 | #endif |