Adds initial intermediate qt6 porting state

This commit is contained in:
torsten committed 2026-08-17 17:54:56 +02:00
1 parent 99136e9460
commit d176b5e0d7
11247 files changed
+1891537

No files matched your search

@@ -0,0 +1,52 @@
#include "tetra_if_impl.h"
#include "mainthread.h"
#include <CoPrtCnv/CoPrtCnvRadioTelegram.hpp>
#include <QtNetwork/QTcpSocket>
#include <time.h>
namespace DifferentialGPS
{
TetraImpl::TetraImpl()
: TetraIF("TetraIF")
, m_main(nullptr)
{}
TetraImpl::~TetraImpl()
{}
void TetraImpl::startThread(int threadIndex, MainThread *main)
{
m_main = main;
startThreadInternal(threadIndex);
}
bool TetraImpl::onNewDataAvailableInternal()
{
QByteArray payload;
if (!m_main->getNewData(payload))
{
DEBUG_LOG(m_logger) << "No data to send";
return false;
}
N_CoPrtCnv::CoPrtCnvRadioTelegram tele(GEF_BESTAETIGUNG, payload.size(), m_broadcastIssi);
tele.setPayloadDataComplete(payload);
tele.setSrcISSI(m_srcIssi);
tele.setDestISSI(m_broadcastIssi);
tele.setZaehler(m_counter++);
m_socket->write(tele.data());
m_socket->flush();
DEBUG_LOG(m_logger) << "Sent " << tele.getSize() << " to Tetra";
return true;
}
}