Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -12,12 +12,11 @@
namespace EffectShowClient
{
ControlUnitHandler::ControlUnitHandler(QObject *parent)
: QObject(parent)
ControlUnitHandler::ControlUnitHandler(QObject *parent) : QObject(parent)
, m_connectionHandler(new ConnectionHandler(this))
, m_timer(new QTimer(this))
, m_feature(EffectShowManagement::Feature_e::NotSpecified)
{
, m_feature(EffectShowManagement::Feature_e::NotSpecified),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
m_timer->setInterval(10000);
connect(m_timer, &QTimer::timeout, this, &ControlUnitHandler::onConnectedToSerialConveter);
m_timer->start();
@@ -32,7 +31,7 @@ bool ControlUnitHandler::init()
{
if (!m_connectionHandler->init())
{
DEBUG_LOG() << "Could not init ConnectionHandler";
DEBUG_LOG(m_logger) << "Could not init ConnectionHandler";
return false;
}
@@ -59,7 +58,7 @@ bool ControlUnitHandler::send(const CommandSignal command, const unsigned int ro
commandByte = command + roundCount;
else
{
DEBUG_LOG() << "Bad round count for command FT_SE_CB_WERFER_STATUS";
DEBUG_LOG(m_logger) << "Bad round count for command FT_SE_CB_WERFER_STATUS";
return false;
}
break;
@@ -70,7 +69,7 @@ bool ControlUnitHandler::send(const CommandSignal command, const unsigned int ro
commandByte = command + roundCount;
else
{
DEBUG_LOG() << "Bad round count for command FT_SE_CB_WERFER_MUNITION";
DEBUG_LOG(m_logger) << "Bad round count for command FT_SE_CB_WERFER_MUNITION";
return false;
}
break;
@@ -82,7 +81,7 @@ bool ControlUnitHandler::send(const CommandSignal command, const unsigned int ro
}
}
DEBUG_LOG() << "Sending int/byte to connectionHandler: " << commandByte << QString::number(commandByte, 2); // todorm
DEBUG_LOG(m_logger) << "Sending int/byte to connectionHandler: " << commandByte << QString::number(commandByte, 2); // todorm
// emit sending(QString(QStringLiteral("%1 - %2")).arg(QString::number(commandByte, 2).rightJustified(8, QLatin1Char('0'))).arg(commandByte));
QByteArray data;
@@ -97,24 +96,24 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
{
if (ba.size() >= 1)
{
TRACE_LOG() << "ControlUnitHandler::onDataReceived ba.at(0) " << (ba.at(0));
TRACE_LOG() << "ControlUnitHandler::onDataReceived ba.at(0) & 0xFF " << (ba.at(0) & 0xFF);
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived ba.at(0) " << (ba.at(0));
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived ba.at(0) & 0xFF " << (ba.at(0) & 0xFF);
}
else
{
DEBUG_LOG() << "ControlUnitHandler::onDataReceived ba is empty";
DEBUG_LOG(m_logger) << "ControlUnitHandler::onDataReceived ba is empty";
return;
}
if (ba.size() >= 2)
{
TRACE_LOG() << "ControlUnitHandler::onDataReceived ba.at(1) " << (ba.at(1));
TRACE_LOG() << "ControlUnitHandler::onDataReceived ba.at(1) & 0xFF " << (ba.at(1) & 0xFF);
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived ba.at(1) " << (ba.at(1));
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived ba.at(1) & 0xFF " << (ba.at(1) & 0xFF);
}
const unsigned int data = ba.at(0);
if (data >= SE_FT_CB_WERFER_MUNITION && data < 93)
{
DEBUG_LOG() << "ControlUnitHandler::SE_FT_CB_WERFER_MUNITION: " << data;
DEBUG_LOG() << "ControlUnitHandler::SE_FT_CB_WERFER_MUNITION real: " << data - SE_FT_CB_WERFER_MUNITION;
DEBUG_LOG(m_logger) << "ControlUnitHandler::SE_FT_CB_WERFER_MUNITION: " << data;
DEBUG_LOG(m_logger) << "ControlUnitHandler::SE_FT_CB_WERFER_MUNITION real: " << data - SE_FT_CB_WERFER_MUNITION;
emit vehicleRoundCount(data - SE_FT_CB_WERFER_MUNITION);
return;
}
@@ -132,14 +131,14 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
* our defined ReturningSignals enum.
*/
TRACE_LOG() << "ControlUnitHandler::onDataReceived ba " << ba;
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived ba " << ba;
const unsigned int commandByte = ba.at(0) & 0xFF;
TRACE_LOG() << "ControlUnitHandler::onDataReceived byte " << commandByte;
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived byte " << commandByte;
const unsigned int byte = ba.at(1) & 0xFF;
TRACE_LOG() << "ControlUnitHandler::onDataReceived cmdbyte" << byte;
TRACE_LOG(m_logger) << "ControlUnitHandler::onDataReceived cmdbyte" << byte;
TRACE_LOG() << "onDataReceived byte: " << byte << " commandByte: " << commandByte;
TRACE_LOG(m_logger) << "onDataReceived byte: " << byte << " commandByte: " << commandByte;
switch (commandByte)
{
@@ -161,7 +160,7 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
emit safetyStatus(SafetyConfirmation_e::SafetyExpiring);
else
emit safetyStatus(SafetyConfirmation_e::SafetyNotConfirmed);
DEBUG_LOG() << "safety warning ";
DEBUG_LOG(m_logger) << "safety warning ";
emit safetyWarnings(sst);
break;
}
@@ -176,7 +175,7 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
else
m_feature = EffectShowManagement::Feature_e::NotSpecified;
DEBUG_LOG() << "Got Vehicle Type " << m_feature;
DEBUG_LOG(m_logger) << "Got Vehicle Type " << m_feature;
emit vehicleType(m_feature);
break;
}
@@ -188,7 +187,7 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
scr.cardrige3 = byte & BIT_POSITION_5;
scr.cardrige4 = byte & BIT_POSITION_4;
scr.cardrige5 = byte & BIT_POSITION_3;
DEBUG_LOG() << " CB STATUS FEUER " << byte;
DEBUG_LOG(m_logger) << " CB STATUS FEUER " << byte;
emit vehicleErrorStatus(scr);
break;
}
@@ -206,7 +205,7 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
scr.cardrige4 = byte & BIT_POSITION_4;
scr.cardrige5 = byte & BIT_POSITION_3;
//emit vehicleSmokeCardridgesStatus(scr);
DEBUG_LOG() << " WERFER STATUS ";
DEBUG_LOG(m_logger) << " WERFER STATUS ";
emit vehicleFireUnits(scr);
break;
}
@@ -218,7 +217,7 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
scr.cardrige3 = byte & BIT_POSITION_5;
scr.cardrige4 = byte & BIT_POSITION_4;
scr.cardrige5 = byte & BIT_POSITION_3;
DEBUG_LOG() << " NB STATUS ";
DEBUG_LOG(m_logger) << " NB STATUS ";
emit vehicleSmokeCardridgesStatus(scr);
break;
}
@@ -240,13 +239,13 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
}
case ReturningSignal::SE_FT_CB_SALVE_ERLEDIGT:
{
DEBUG_LOG() << "Volley Done";
DEBUG_LOG(m_logger) << "Volley Done";
emit vehicleFinshedVolley(byte);
break;
}
case ReturningSignal::SE_FT_CB_SALVE_UNTERBROCHEN:
{
DEBUG_LOG() << "Volley Stopped!!";
DEBUG_LOG(m_logger) << "Volley Stopped!!";
emit vehicleStoppedVolley(byte);
//add error to ui
CardRidges scr;
@@ -256,22 +255,22 @@ void ControlUnitHandler::onDataReceived(const QByteArray &ba)
}
case ReturningSignal::SE_FT_CB_SICHERHEIT_WIDERRUFEN:
{
DEBUG_LOG() << "Sicherheit widerrufen!!";
DEBUG_LOG(m_logger) << "Sicherheit widerrufen!!";
emit vehicleSafetyRevoked();
break;
}
default:
{
DEBUG_LOG() << "onDataReceived switch default";
DEBUG_LOG(m_logger) << "onDataReceived switch default";
break;
}
}
TRACE_LOG() << "end of onDataReceived";
TRACE_LOG(m_logger) << "end of onDataReceived";
}
void ControlUnitHandler::onConnectedToSerialConveter()
{
DEBUG_LOG() << "Send Type Request";
DEBUG_LOG(m_logger) << "Send Type Request";
send(CommandSignal::FT_SE_CB_FZRSTYP);
}