/QMK-Groundstation/branches/libMK/libMK/Communication.cpp |
---|
0,0 → 1,13 |
#include "Communication.h" |
bool Communication::is_connected() { |
return connected; |
} |
void Communication::connection_established() { |
connected = true; |
} |
void Communication::connection_lost() { |
connected = false; |
} |
/QMK-Groundstation/branches/libMK/libMK/Communication.h |
---|
0,0 → 1,22 |
#ifndef COMMUNICATION_H |
#define COMMUNICATION_H |
/** |
* communication interface for Mikrokopter (MK) USART connection |
*/ |
class Communication{ |
protected: |
bool connected; |
public: |
//connect to MK |
virtual void connect_MK(char *) {}; |
//send command to MK |
virtual void send_cmd(char, int, char[150],unsigned int, bool) {}; |
virtual void stop_resend() {}; |
virtual void received_data(char *) {}; |
void connection_established(); |
void connection_lost(); |
bool is_connected(); |
}; |
#endif |
/QMK-Groundstation/branches/libMK/libMK/Handler.cpp |
---|
1,4 → 1,5 |
#include<Handler.h> |
#include "Handler.h" |
#include <iostream> |
/** |
* Constructor that gets a communication instance |
321,7 → 322,7 |
// Debug-Daten |
case 'D' : // DONE 0.71g |
for (int i = 0; i < MaxAnalog; i++) { |
//AnalogData[i] = Parser::dataToInt(RX.decode, (i * 2) + 2); |
std::cout << Parser::dataToInt(data, (i * 2) + 2) << std::endl; |
} |
//show_DebugData(); |
break; |
/QMK-Groundstation/branches/libMK/libMK/QTSerialCommunication.cpp |
---|
74,4 → 74,7 |
* resend timer timout |
*/ |
void QTSerialCommunication::slot_resend_timer() { |
} |
void QTSerialCommunication::received_data(char * data) { |
} |
/QMK-Groundstation/branches/libMK/libMK/QTSerialCommunication.h |
---|
13,7 → 13,7 |
* ( philippe.vianney.liaud gmail.com ) |
*/ |
class QTSerialCommunication : public Communication, QObject { |
class QTSerialCommunication : public QObject, public Communication { |
Q_OBJECT |
private: |