Subversion Repositories Projects

Rev

Rev 361 | Go to most recent revision | 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
29
#include "com/Kopter.h"
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
static const QString QA_NAME = "QMK-Groundstation";
48
static const QString QA_VERSION_NR = "0.8.5 - own flight lib";
158 KeyOz 49
 
391 Brean 50
// sleep time - time to wait until next command is received
51
// FIXME: delete this / rewrite to use interrupts, mutex or something elsebetter than timeouts
227 KeyOz 52
static const int SLEEP = 500000;
199 KeyOz 53
 
234 KeyOz 54
#ifdef _BETA_
246 KeyOz 55
    static const QString QA_VERSION = QA_VERSION_NR + " (BETA)";
334 KeyOz 56
    static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c";
234 KeyOz 57
#else
246 KeyOz 58
    static const QString QA_VERSION = QA_VERSION_NR;
337 KeyOz 59
    static const QString QA_HWVERSION = "FlightCtrl v0.73d & NaviCtrl v0.15c";
234 KeyOz 60
#endif
246 KeyOz 61
 
305 KeyOz 62
#ifdef Q_OS_LINUX
63
    static const QString QA_OS = "Linux";
64
#else
65
    #ifdef Q_OS_DARWIN
66
        static const QString QA_OS = "OSX";
67
    #else
68
        #ifdef Q_OS_WIN32
69
            static const QString QA_OS = "Windows";
70
        #else
71
            static const QString QA_OS = "n/a";
72
        #endif
73
    #endif
74
#endif
75
 
76
 
361 KeyOz 77
static const QString QA_DATE = "13.04.2009";
199 KeyOz 78
static const QString QA_YEAR = "2008-2009";
158 KeyOz 79
static const QString QA_AUTHOR = "Manuel Schrape";
80
static const QString QA_EMAIL  = "manuel.schrape@gmx.de";
81
 
82
static const QString QA_ABOUT =
83
    "<HTML>"
84
    "<p><b><font size=8>" + QA_NAME + "</font></b></p>"
85
    "<br />"
305 KeyOz 86
    "Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + ""
246 KeyOz 87
    "<br /><b>kompatibel zu " + QA_HWVERSION + "</b>"
158 KeyOz 88
    "<br /><br />"
89
    "(C) " + QA_YEAR + " by " + QA_AUTHOR + " - "
90
    "<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />"
91
    "Groundstation-Programm f&uuml;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&ouml;ffentlicht."
93
    "</HTML>";
94
 
162 KeyOz 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"};
158 KeyOz 96
 
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
 
99
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};
100
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};
101
 
102
#endif