1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

AeroSimRC: fix spelling in imported sources (thanks Jose)

This commit is contained in:
Oleg Semyonov 2012-07-21 21:32:59 +03:00
parent c80e5a2bc9
commit c3791532b8
3 changed files with 20 additions and 20 deletions

View File

@ -40,7 +40,7 @@ QList<quint16> videoModes;
QTime ledTimer;
UdpSender *sndr;
UdpReciever *rcvr;
UdpReceiver *rcvr;
const float RAD2DEG = (float)(180.0 / M_PI);
const float DEG2RAD = (float)(M_PI / 180.0);
@ -104,7 +104,7 @@ SIM_DLL_EXPORT void AeroSIMRC_Plugin_Init(pluginInit *p)
sndr = new UdpSender(ini->getOutputMap(), ini->isFromTX());
sndr->init(ini->remoteHost(), ini->remotePort());
rcvr = new UdpReciever(ini->getInputMap(), ini->isToRX());
rcvr = new UdpReceiver(ini->getInputMap(), ini->isToRX());
rcvr->init(ini->localHost(), ini->localPort());
// run thread

View File

@ -112,12 +112,12 @@ void UdpSender::sendDatagram(const simToPlugin *stp)
//-----------------------------------------------------------------------------
UdpReciever::UdpReciever(const QList<quint8> map,
UdpReceiver::UdpReceiver(const QList<quint8> map,
bool isRX,
QObject *parent)
: QThread(parent)
{
qDebug() << this << "UdpReciever::UdpReciever thread:" << thread();
qDebug() << this << "UdpReceiver::UdpReceiver thread:" << thread();
stopped = false;
inSocket = NULL;
@ -130,17 +130,17 @@ UdpReciever::UdpReciever(const QList<quint8> map,
packetsRecived = 1;
}
UdpReciever::~UdpReciever()
UdpReceiver::~UdpReceiver()
{
qDebug() << this << "UdpReciever::~UdpReciever";
qDebug() << this << "UdpReceiver::~UdpReceiver";
if (inSocket)
delete inSocket;
}
// public
void UdpReciever::init(const QString &localHost, quint16 localPort)
void UdpReceiver::init(const QString &localHost, quint16 localPort)
{
qDebug() << this << "UdpReciever::init";
qDebug() << this << "UdpReceiver::init";
inSocket = new QUdpSocket();
qDebug() << this << "inSocket constructed" << inSocket->thread();
@ -148,21 +148,21 @@ void UdpReciever::init(const QString &localHost, quint16 localPort)
inSocket->bind(QHostAddress(localHost), localPort);
}
void UdpReciever::run()
void UdpReceiver::run()
{
qDebug() << this << "UdpReciever::run start";
qDebug() << this << "UdpReceiver::run start";
while (!stopped)
onReadyRead();
qDebug() << this << "UdpReciever::run ended";
qDebug() << this << "UdpReceiver::run ended";
}
void UdpReciever::stop()
void UdpReceiver::stop()
{
qDebug() << this << "UdpReciever::stop";
qDebug() << this << "UdpReceiver::stop";
stopped = true;
}
void UdpReciever::setChannels(pluginToSim *pts)
void UdpReceiver::setChannels(pluginToSim *pts)
{
QMutexLocker locker(&mutex);
@ -183,7 +183,7 @@ void UdpReciever::setChannels(pluginToSim *pts)
}
}
void UdpReciever::getFlighStatus(quint8 &arm, quint8 &mod)
void UdpReceiver::getFlighStatus(quint8 &arm, quint8 &mod)
{
QMutexLocker locker(&mutex);
@ -192,7 +192,7 @@ void UdpReciever::getFlighStatus(quint8 &arm, quint8 &mod)
}
// private
void UdpReciever::onReadyRead()
void UdpReceiver::onReadyRead()
{
if (!inSocket->waitForReadyRead(8)) // 1/60fps ~= 16.7ms, 1/120fps ~= 8.3ms
return;
@ -209,7 +209,7 @@ void UdpReciever::onReadyRead()
}
}
void UdpReciever::processDatagram(QByteArray &datagram)
void UdpReceiver::processDatagram(QByteArray &datagram)
{
QDataStream stream(datagram);
stream.setFloatingPointPrecision(QDataStream::SinglePrecision);

View File

@ -57,12 +57,12 @@ private:
};
class UdpReciever : public QThread
class UdpReceiver : public QThread
{
// Q_OBJECT
public:
explicit UdpReciever(const QList<quint8> map, bool isRX, QObject *parent = 0);
~UdpReciever();
explicit UdpReceiver(const QList<quint8> map, bool isRX, QObject *parent = 0);
~UdpReceiver();
void init(const QString &localHost, quint16 localPort);
void run();
void stop();