summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-08 19:29:54 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-08 19:29:54 +0200
commitf5c9765f76141840e411159933098c6f4bad7f33 (patch)
treed44060cf03dc78b853bb1e88f23d80d70dce729a /ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
parenta12d2533e2025959a33ebf692e2a65bffa3684fa (diff)
correct fgfs protocol bitrot
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_protocol_fg/ftnoir_protocol_fg.cpp')
-rw-r--r--ftnoir_protocol_fg/ftnoir_protocol_fg.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
index dc76d193..643f9dd5 100644
--- a/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
+++ b/ftnoir_protocol_fg/ftnoir_protocol_fg.cpp
@@ -74,7 +74,7 @@ void FTNoIR_Protocol::loadSettings() {
QString destAddr = iniFile.value ( "IP-1", 192 ).toString() + "." + iniFile.value ( "IP-2", 168 ).toString() + "." + iniFile.value ( "IP-3", 2 ).toString() + "." + iniFile.value ( "IP-4", 1 ).toString();
destIP = QHostAddress( destAddr );
}
- destPort = iniFile.value ( "PortNumber", 5550 ).toInt();
+ destPort = iniFile.value ( "PortNumber", 5542 ).toInt();
iniFile.endGroup ();
@@ -91,10 +91,10 @@ quint16 senderPort;
//
// Copy the Raw measurements directly to the client.
//
- FlightData.x = headpose[TX];
- FlightData.y = headpose[Pitch];
- FlightData.z = headpose[TZ];
- FlightData.p = headpose[TY];
+ FlightData.x = headpose[TX] * 1e-2;
+ FlightData.y = headpose[TY] * 1e-2;
+ FlightData.z = headpose[TZ] * 1e-2;
+ FlightData.p = headpose[Pitch];
FlightData.h = headpose[Yaw];
FlightData.r = headpose[Roll];
FlightData.status = fg_cmd;
@@ -129,11 +129,9 @@ quint16 senderPort;
#ifndef SEND_ASCII_DATA
//! [1]
-// no_bytes = outSocket->writeDatagram((const char *) &FlightData, sizeof( FlightData ), QHostAddress::LocalHost, 5550);
if (outSocket != 0) {
no_bytes = outSocket->writeDatagram((const char *) &FlightData, sizeof( FlightData ), destIP, destPort);
if ( no_bytes > 0) {
- // qDebug() << "FGServer::writePendingDatagrams says: bytes send =" << no_bytes << sizeof( double );
}
else {
qDebug() << "FGServer::writePendingDatagrams says: nothing sent!";