/QMK-Groundstation/trunk/Classes/ToolBox.cpp |
---|
137,29 → 137,6 |
return QString(TX_Buff); |
} |
// Datensatz nach 8bit Integer |
int ToolBox::Data2Char(int *Data , int Start, bool is_signed) |
{ |
int Out = (Data[Start]); |
if ((Out > 128) && (is_signed)) |
Out = Out - 256; |
return Out; |
} |
// Datensatz nach 8bit Integer |
int ToolBox::Char2Data(int Data) |
{ |
if (Data < 0) |
{ |
return Data + 256; |
} |
return Data; |
} |
// Datensatz nach 16bit Integer |
int ToolBox::Data2Int(int *Data , int Start, bool is_signed) |
{ |
/QMK-Groundstation/trunk/Classes/ToolBox.h |
---|
31,12 → 31,8 |
static QString Encode64(char Data[150],unsigned int Length); |
static bool check_CRC(QString RXString); |
static QString add_CRC(QString TXString); |
static int Data2Char(int *Data , int Start, bool is_signed = true); |
static int Data2Int(int *Data , int Start, bool is_signed = true); |
static long Data2Long(int *Data , int Start, bool is_signed = true); |
static int Char2Data(int Data); |
static QString Data2QString(int Data[150], int Start = 0, int End = 150); |
static QIcon Icon(int ID); |
static QString get_Float(long Wert, long Count); |
/QMK-Groundstation/trunk/Classes/cConnection.cpp |
---|
39,8 → 39,6 |
void cConnection::new_Data(QString Data) |
{ |
Data = Data; |
while ((RxData.String.length() > 1) && (RxData.String.at(1) == '#')) |
{ |
RxData.String.remove(0,1); |
/QMK-Groundstation/trunk/Forms/dlg_MotorMixer.h |
---|
File deleted |
/QMK-Groundstation/trunk/Forms/dlg_MotorMixer.cpp |
---|
File deleted |
/QMK-Groundstation/trunk/Forms/dlg_MotorMixer.ui |
---|
File deleted |
/QMK-Groundstation/trunk/Forms/mktool.cpp |
---|
60,7 → 60,7 |
setWindowTitle(QA_NAME + " v" + QA_VERSION); |
// Tab mit Debug-Elementen verbergen |
//tab_Main->removeTab(6); |
tab_Main->removeTab(6); |
// Develop - Nicht gebrauchte sachen abschalten. |
pb_SettingsReset->hide(); |
pb_Flash->hide(); |
69,8 → 69,6 |
// Beta-Sachen einschalten. |
#ifdef _BETA_ |
ac_QMKServer->setEnabled(true); |
#else |
ac_MotorMixer->setVisible(false); |
#endif |
// Settings-Tab hinzufügen. |
f_Settings = new wdg_Settings( this ); |
211,9 → 209,6 |
f_LCD = new dlg_LCD(this); |
// LCD-Dialog |
f_MotorMixer = new dlg_MotorMixer(this); |
// LCD-Dialog |
f_Map = new dlg_Map(this); |
f_Map->create_Map(Settings); |
254,7 → 249,6 |
connect(ac_Config, SIGNAL(triggered()), this, SLOT(slot_ac_Config())); |
connect(ac_Preferences, SIGNAL(triggered()), this, SLOT(slot_ac_Preferences())); |
connect(ac_Motortest, SIGNAL(triggered()), this, SLOT(slot_ac_Motortest())); |
connect(ac_MotorMixer, SIGNAL(triggered()), this, SLOT(slot_ac_MotorMixer())); |
connect(ac_LCD, SIGNAL(triggered()), this, SLOT(slot_ac_LCD())); |
connect(ac_Map, SIGNAL(triggered()), this, SLOT(slot_ac_Map())); |
connect(ac_FastDebug, SIGNAL(triggered()), this, SLOT(slot_ac_FastDebug())); |
689,16 → 683,6 |
slot_Motortest(0,0,0,0); |
} |
void MKTool::slot_ac_MotorMixer() |
{ |
f_MotorMixer->set_Objects(o_Connection, Settings); |
f_MotorMixer->read_Mixer(); |
if (f_MotorMixer->exec()==QDialog::Accepted) |
{ |
} |
} |
void MKTool::slot_ac_LCD() |
{ |
if (!f_LCD->isVisible()) |
1397,27 → 1381,6 |
case ADDRESS_FC : |
switch(RX.Input[2]) |
{ |
// Motor-Mixer |
case 'N' : |
if (ToolBox::Decode64(RX)) |
{ |
if (RX.Decode[0] == VERSION_MIXER) |
{ |
f_MotorMixer->set_MotorConfig(RX); |
} |
} |
break; |
// Motor-Mixer Schreib-Bestätigung |
case 'M' : |
if (ToolBox::Decode64(RX)) |
{ |
if (RX.Decode[0] == 1) |
{ |
lb_Status->setText(tr("MotorMixer-Daten in FC geschrieben.")); |
} |
} |
break; |
// Stick-Belegung der Fernsteuerung |
case 'P' : // DONE 0.71g |
if (ToolBox::Decode64(RX)) |
1673,11 → 1636,8 |
{ |
if ((cb_ShowMSG->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked()))) |
{ |
if (Text.length() > 0) |
{ |
te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor); |
te_RX->insertHtml("<span style=\"color:#008b00;\">" + Text + "</span><br />"); |
} |
te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor); |
te_RX->insertHtml("<span style=\"color:#008b00;\">" + Text + "</span>"); |
} |
} |
break; |
/QMK-Groundstation/trunk/Forms/mktool.h |
---|
41,7 → 41,6 |
#include "wdg_Settings.h" |
#include "dlg_LCD.h" |
#include "dlg_Map.h" |
#include "dlg_MotorMixer.h" |
#include "../Classes/cConnection.h" |
#include "../Classes/cSettings.h" |
81,9 → 80,6 |
// LCD-Dialog |
dlg_LCD *f_LCD; |
// MotorMixer-Dialog |
dlg_MotorMixer *f_MotorMixer; |
// Map-Dialog |
dlg_Map *f_Map; |
193,7 → 189,6 |
void slot_ac_Motortest(); |
void slot_ac_LCD(); |
void slot_ac_Map(); |
void slot_ac_MotorMixer(); |
void slot_pb_HexFile(); |
void slot_pb_SendWaypoint(); |
/QMK-Groundstation/trunk/Forms/mktool.ui |
---|
2051,10 → 2051,9 |
<property name="title"> |
<string>&Einstellungen</string> |
</property> |
<addaction name="ac_MotorMixer"/> |
<addaction name="ac_Config"/> |
<addaction name="separator"/> |
<addaction name="ac_Preferences"/> |
<addaction name="ac_Config"/> |
</widget> |
<widget class="QMenu" name="menu_Help"> |
<property name="title"> |
2107,7 → 2106,6 |
<addaction name="ac_SelFC"/> |
<addaction name="ac_SelNC"/> |
<addaction name="ac_SelMag"/> |
<addaction name="separator"/> |
</widget> |
<widget class="QMenu" name="menu_Navi_Daten"> |
<property name="title"> |
2527,15 → 2525,6 |
<string>Flug-Karte</string> |
</property> |
</action> |
<action name="ac_MotorMixer"> |
<property name="icon"> |
<iconset resource="../MKTool.qrc"> |
<normaloff>:/Actions/Images/Actions/MotorMixer.png</normaloff>:/Actions/Images/Actions/MotorMixer.png</iconset> |
</property> |
<property name="text"> |
<string>Motor-Mixer</string> |
</property> |
</action> |
</widget> |
<customwidgets> |
<customwidget> |
/QMK-Groundstation/trunk/Images/Actions/MotorMixer.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/QMK-Groundstation/trunk/MKTool.qrc |
---|
15,7 → 15,6 |
<file>Images/Arrows/Up-2.png</file> |
</qresource> |
<qresource prefix="Actions" > |
<file>Images/Actions/MotorMixer.png</file> |
<file>Images/Actions/Folder-Open.png</file> |
<file>Images/Actions/Preferences-Data.png</file> |
<file>Images/Actions/Preferences.png</file> |
/QMK-Groundstation/trunk/Parameter_Positions.h |
---|
61,17 → 61,8 |
// Positionen der Setting-Parameter |
/////////////////////////////////// |
#ifdef _BETA_ |
static const int VERSION_SETTINGS = 75; |
static const int VERSION_MIXER = 1; |
#else |
static const int VERSION_SETTINGS = 74; |
static const int VERSION_MIXER = 1; |
#endif |
static const int MAXMOTOR = 12; |
static const int MaxParameter = 93; |
static const int P_KANAL_GAS = 0; |
/QMK-Groundstation/trunk/global.h |
---|
56,11 → 56,11 |
static const int SLEEP = 500000; |
static const QString QA_NAME = "QMK-Groundstation"; |
static const QString QA_VERSION_NR = "0.7.10"; |
static const QString QA_VERSION_NR = "0.7.9"; |
#ifdef _BETA_ |
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)"; |
static const QString QA_HWVERSION = "FlightCtrl v0.73c & NaviCtrl v0.14e"; |
static const QString QA_HWVERSION = "FlightCtrl v0.72p & NaviCtrl v0.14b"; |
#else |
static const QString QA_VERSION = QA_VERSION_NR; |
static const QString QA_HWVERSION = "FlightCtrl v0.72p & NaviCtrl v0.14b"; |
81,7 → 81,7 |
#endif |
static const QString QA_DATE = "19.03.2009"; |
static const QString QA_DATE = "15.03.2009"; |
static const QString QA_YEAR = "2008-2009"; |
static const QString QA_AUTHOR = "Manuel Schrape"; |
static const QString QA_EMAIL = "manuel.schrape@gmx.de"; |
/QMK-Groundstation/trunk/global.pri |
---|
34,8 → 34,7 |
Logger/CSVLogger.cpp \ |
Forms/dlg_LCD.cpp \ |
Classes/cConnection.cpp \ |
Forms/dlg_Map.cpp \ |
Forms/dlg_MotorMixer.cpp |
Forms/dlg_Map.cpp |
win32:SOURCES += SerialPort/win_qextserialport.cpp |
unix:SOURCES += SerialPort/posix_qextserialport.cpp |
62,8 → 61,7 |
Forms/dlg_LCD.h \ |
Classes/cConnection.h \ |
typedefs.h \ |
Forms/dlg_Map.h \ |
Forms/dlg_MotorMixer.h |
Forms/dlg_Map.h |
win32:HEADERS += SerialPort/win_qextserialport.h |
unix:HEADERS += SerialPort/posix_qextserialport.h |
75,5 → 73,4 |
Forms/dlg_Motortest.ui \ |
Forms/wdg_Settings.ui \ |
Forms/dlg_LCD.ui \ |
Forms/dlg_Map.ui \ |
Forms/dlg_MotorMixer.ui |
Forms/dlg_Map.ui |
/QMK-Groundstation/trunk/typedefs.h |
---|
1,19 → 1,38 |
#ifndef TYPEDEFS_H |
#define TYPEDEFS_H |
#define INVALID 0x00 |
#define NEWDATA 0x01 |
#define PROCESSED 0x02 |
#ifdef _BETA_ |
typedef struct |
{ |
int32_t Longitude; // in 1E-7 deg |
int32_t Latitude; // in 1E-7 deg |
int32_t Altitude; // in mm |
uint8_t Status; // validity of data |
} __attribute__((packed)) GPS_Pos_t; |
#define INVALID 0x00 |
#define NEWDATA 0x01 |
#define PROCESSED 0x02 |
typedef struct |
{ |
int32_t Longitude; // in 1E-7 deg |
int32_t Latitude; // in 1E-7 deg |
int32_t Altitude; // in mm |
uint8_t Status; // validity of data |
} __attribute__((packed)) GPS_Pos_t; |
#else |
typedef enum |
{ |
INVALID = 0, |
NEWDATA = 1, |
PROCESSED = 2 |
} Status_t; |
typedef struct |
{ |
int32_t Longitude; // in 1E-7 deg |
int32_t Latitude; // in 1E-7 deg |
int32_t Altitude; // in mm |
Status_t Status; // validity of data |
} __attribute__((packed)) GPS_Pos_t; |
#endif |
typedef struct |
{ |
GPS_Pos_t Position; // the gps position of the waypoint, see ubx.h for details |
24,11 → 43,4 |
uint8_t reserve[12]; // reserve |
} __attribute__((packed)) Waypoint_t; |
typedef struct |
{ |
char Revision; |
char Name[12]; |
signed char Motor[16][4]; |
} Mixer_t; |
#endif // TYPEDEFS_H |