Rev 440 |
Rev 450 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include "QTSerialCommunication.h"
#include "../libMK/Parser.h"
/**
* initiate connection and stuff
*/
QTSerialCommunication::QTSerialCommunication() {
serial = new ManageSerialPort();
serial->setBaudRate(BAUD57600); //BaudRate
serial->setDataBits(DATA_8); //DataBits
serial->setParity(PAR_NONE); //Parity
serial->setStopBits(STOP_1); //StopBits
serial->setFlowControl(FLOW_OFF); //FlowControl
serial->setTimeout(0, 10);
serial->enableSending();
serial->enableReceiving();
}
/**
* connect to Mikrokopter
*/
void QTSerialCommunication::connect_MK(string addr) {
};
/**
* send command to Mikrokopter
*/
bool QTSerialCommunication::send_cmd(char cmd, int address, char data[150], unsigned int length, bool resend) {
if (is_connected()) {
//a valid command starts
}
return true;
};
/**
* stop sending commands to Mikrokopter
* stop timer
*/
void QTSerialCommunication::stop_resend() {
};