/QMK-Groundstation/branches/own_com_lib/Forms/mktool.cpp |
---|
1602,7 → 1602,7 |
{ |
lb_Analog[a]->setText(Settings->Analog1.Label[a]); |
} |
Settings->Analog1.Version = Mode.Version; |
Settings->Analog1.Version = QString(Mode.Version); |
Settings->write_Settings_AnalogLabels(HardwareID); |
config_Plot(); |
} |
1637,9 → 1637,10 |
QString version = QString("%1").arg(RX.decode[0]) + "." + |
QString("%1").arg(RX.decode[1]) + |
QString(RX.decode[4] + 'a'); |
Mode.Version = version.toLatin1(); |
Mode.Version = version.toLatin1().data; |
setWindowTitle(QA_NAME + " v" + QA_VERSION + " - " + |
QString(Mode.Hardware) + " " + Mode.Version); |
Mode.Hardware + " " + |
Mode.Version); |
if (Mode.VERSION_SERIAL_MAJOR != VERSION_SERIAL_MAJOR) |
{ |
1718,7 → 1719,7 |
Settings->read_Settings_Analog(HardwareID); |
Settings->read_Settings_AnalogLabels(HardwareID); |
if (Settings->Analog1.Version != Mode.Version) |
if (Settings->Analog1.Version != QString(Mode.Version)) |
{ |
lb_Status->setText(tr("Analoglabel-Version unterschiedlich. Lese Analoglabels neu aus.")); |
slot_ac_GetLabels(); |
1740,7 → 1741,7 |
// QMK_Server->send_RawData(RX.String); |
} |
slot_showTerminal(1, RX.str); |
slot_showTerminal(1, QString(RX.str)); |
} |
void MKTool::slot_showTerminal(int Typ, QString Text) |
/QMK-Groundstation/branches/own_com_lib/com/Communication.h |
---|
0,0 → 1,18 |
#ifndef COMMUNICATION_H |
#define COMMUNICATION_H |
#include <string> |
/** |
* communication interface for Mikrokopter (MK) USART connection |
*/ |
using namespace std; |
class Communication { |
public: |
//connect to MK |
virtual void connectMK(string) {}; |
//send command to MK |
virtual bool sendCmd(char, int, char[150],unsigned int, bool) {}; |
}; |
#endif |
/QMK-Groundstation/branches/own_com_lib/com/Handler.cpp |
---|
1,9 → 1,16 |
#include<Handler.h> |
/** |
* Constructor that gets a communication instance |
*/ |
Handler::Handler(Communication * com) { |
this->com = com; |
} |
/** |
* read mixer values from FlightCtrl |
*/ |
void Handler::read_mixer() { |
TX_Data[0] = 0; |
o_Connection->send_Cmd('n', ADDRESS_FC, TX_Data, 1, true); |
com->send_cmd('n', ADDRESS_FC, TX_Data, 1, true); |
} |
/QMK-Groundstation/branches/own_com_lib/com/Handler.h |
---|
2,6 → 2,7 |
#define HANDLER_H |
#include <string> |
#include <Parser.h> |
#include <Communication.h> |
/** |
* The Handler handels commands that are send from/to the Mikrokopter |
9,7 → 10,10 |
*/ |
class Handler { |
private: |
Communication * com; |
public: |
Handler(Communication * com); |
void read_mixer(); |
}; |
/QMK-Groundstation/branches/own_com_lib/com/QTCommunication.cpp |
---|
0,0 → 1,9 |
#include <QTCommunication.h> |
void QTCommunication::connectMK(string addr) { |
}; |
bool QTCommunication::sendCmd(char cmd, int address, char data[150], unsigned int length, bool resend) { |
}; |
/QMK-Groundstation/branches/own_com_lib/com/QTCommunication.h |
---|
0,0 → 1,18 |
#ifndef QT_COMMUNICATION_H |
#define QT_COMMUNICATION_H |
#include <Communication.h> |
/** |
* QT specific communication class |
* based on the communication interface |
* using the SerialPort implementation |
* by VIANNEY-LIAUD Philippe |
* ( philippe.vianney.liaud gmail.com ) |
*/ |
class QTCommunication : public Communication { |
public: |
void connectMK(string addr); |
bool sendCmd(char cmd, int address, char data[150], unsigned int length, bool resend); |
}; |
#endif |
/QMK-Groundstation/branches/own_com_lib/eeepc.pro |
---|
6,4 → 6,8 |
LIBS += -lqwt-qt4 |
INCLUDEPATH += $(HOME)/include /usr/include/qwt-qt4 |
include(global.pri)HEADERS += com/Handler.h com/Parser.h com/Kopter.h |
include(global.pri)HEADERS += com/Handler.h com/Parser.h com/Kopter.h \ |
com/Communication.h \ |
com/QTCommunication.h |
SOURCES += com/QTCommunication.cpp |