Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 397 → Rev 396

/QMK-Groundstation/branches/own_com_lib/Classes/ToolBox.cpp
36,7 → 36,6
#endif
}
 
/*
QString ToolBox::get_Float(long Wert, int Count)
{
QString Temp, s_Wert;
46,7 → 45,7
Temp = s_Wert.left(s_Wert.length() - Count) + QString(".") + s_Wert.right(Count);
 
return Temp;
}*/
}
 
// Datensatz nach QString
QString ToolBox::dataToQString(int Data[150], int Start, int End)
/QMK-Groundstation/branches/own_com_lib/Classes/ToolBox.h
29,7 → 29,7
public :
static QString dataToQString(int Data[150], int Start = 0, int End = 150);
static QIcon Icon(int ID);
//static QString get_Float(long Wert, int Count);
static QString get_Float(long Wert, int Count);
static void wait(int Time);
};
 
/QMK-Groundstation/branches/own_com_lib/Forms/mktool.cpp
399,17 → 399,15
void MKTool::parse_TargetKML()
{
QString Tmp = te_KML->toPlainText().simplified();
QStringList list;
QStringList List;
 
if ((Tmp.contains("<kml xmlns=\"http://earth.google.com/kml/2.2\">")) && (Tmp.contains("<coordinates>")))
{
list = Tmp.split("<coordinates>");
list = list[1].split(",");
List = Tmp.split("<coordinates>");
List = List[1].split(",");
 
le_TarLong->setText( QString::number( list[0].toDouble() ) );
le_TarLat->setText( QString::number( list[1].toDouble() ) );
//le_TarLong->setText(ToolBox::get_Float((List[0].toDouble() * 10000000), 7));
//le_TarLat->setText(ToolBox::get_Float((List[1].toDouble() * 10000000), 7));
le_TarLong->setText(ToolBox::get_Float((List[0].toDouble() * 10000000), 7));
le_TarLat->setText(ToolBox::get_Float((List[1].toDouble() * 10000000), 7));
}
}
 
472,10 → 470,10
msg += tr("Bitte die Eingabe ueberpruefen!\n");
msg += tr("Die Werte muessen sich in der Naehe der aktuellen Koordinaten befinden\n");
msg += "(Lon: ";
msg += QString::number(Navi.Current.Longitude);
msg += ToolBox::get_Float(Navi.Current.Longitude,7);
msg += ", ";
msg += "Lat: ";
msg += QString::number(Navi.Current.Latitude);
msg += ToolBox::get_Float(Navi.Current.Latitude,7);
msg += ")";
msgB.setText(msg);
msgB.exec();
/QMK-Groundstation/branches/own_com_lib/com/Communication.h
11,9 → 11,9
class Communication{
public:
//connect to MK
virtual void connect_MK(string) {};
virtual void connectMK(string) {};
//send command to MK
virtual bool send_cmd(char, int, char[150],unsigned int, bool) { return false; };
virtual void stop_resend() {};
virtual bool sendCmd(char, int, char[150],unsigned int, bool) { return false; };
virtual void stopReSend() {};
};
#endif
/QMK-Groundstation/branches/own_com_lib/com/Handler.cpp
13,7 → 13,7
void Handler::read_mixer() {
char tx_data[1] = {0};
//com->log("read motor mixer");
com->send_cmd('n', ADDRESS_FC, tx_data, 1, true);
com->sendCmd('n', ADDRESS_FC, tx_data, 1, true);
}
 
void Handler::get_motor_config() {
31,7 → 31,7
case 'N' :
if (Parser::decode64(RX))
{
com->stop_resend();
com->stopReSend();
 
if (RX.decode[0] == VERSION_MIXER)
{
43,7 → 43,7
case 'M' :
if (Parser::decode64(RX))
{
com->stop_resend();
com->stopReSend();
 
if (RX.decode[0] == 1)
{
70,7 → 70,7
case 'Q' : // DONE 0.71g
if (Parser::decode64(RX))
{
com->stop_resend();
com->stopReSend();
 
if (RX.decode[1] == VERSION_SETTINGS)
{
101,7 → 101,7
break;
// Settings written
case 'S' : // DONE 0.71g
com->stop_resend();
com->stopReSend();
//TODO: QMessagebox("settings written successful") ?
break;
}
126,7 → 126,7
case 'L' : // DONE 0.71g
if (Parser::decode64(RX))
{
com->stop_resend();
com->stopReSend();
 
/*int LCD[150];
memcpy(LCD,RX.decode, sizeof(RX.decode));
142,7 → 142,7
case 'A' : // DONE 0.71g
if (Parser::decode64(RX))
{
com->stop_resend();
com->stopReSend();
 
int Position = RX.decode[0];
if (Position != 31)
185,7 → 185,7
case 'V' : // DONE 0.71h
if (Parser::decode64(RX))
{
com->stop_resend();
com->stopReSend();
/*
Mode.ID = HardwareID;
Mode.VERSION_MAJOR = RX.decode[0];
/QMK-Groundstation/branches/own_com_lib/com/QTCommunication.cpp
1,19 → 1,13
#include <QTCommunication.h>
 
/**
* connect to Mikrokopter
*/
void QTCommunication::connect_MK(string addr) {
void QTCommunication::connectMK(string addr) {
};
 
/**
* send command to Mikrokopter
*/
bool QTCommunication::send_cmd(char cmd, int address, char data[150], unsigned int length, bool resend) {
return true;
bool QTCommunication::sendCmd(char cmd, int address, char data[150], unsigned int length, bool resend) {
};
 
void QTCommunication::stop_resend() {
void QTCommunication::stopReSend() {
};
/QMK-Groundstation/branches/own_com_lib/com/QTCommunication.h
14,8 → 14,8
 
class QTCommunication : public Communication {
public:
void connect_MK(string addr);
bool send_cmd(char cmd, int address, char data[150], unsigned int length, bool resend);
void stop_resend();
void connectMK(string addr);
bool sendCmd(char cmd, int address, char data[150], unsigned int length, bool resend);
void stopReSend();
};
#endif