add log binary data from UART. all Works

This commit is contained in:
2026-05-29 19:20:40 +03:00
parent 5462ec0525
commit d5a6fe4d7d
7 changed files with 50 additions and 19 deletions

View File

@@ -16,7 +16,7 @@ void Logger::write(const QString& file, const QString& text)
f.close();
}
void Logger::saveTestLog(const QString& filename, const QJsonObject& cfg,
void Logger::saveTestLog(const QString& filename, const QByteArray& rx, const QJsonObject& cfg,
bool passed, QString& error, QString mismatches)
{
QString log;
@@ -47,6 +47,11 @@ void Logger::saveTestLog(const QString& filename, const QJsonObject& cfg,
log += "\n";
}
log += "\n--- FULL LOG ---\n";
log += QString::fromUtf8(rx.toHex(' '));
log += "\n";
log += "<<<TEST_END>>>\n";
write(filename, log);

View File

@@ -18,7 +18,7 @@ public:
const QString& error = "");
static void saveTestLog(const QString& filename, const QJsonObject& cfg,
static void saveTestLog(const QString& filename, const QByteArray &rx, const QJsonObject& cfg,
bool passed, QString &error, QString mismatches);
static void appendSummary(

View File

@@ -13,7 +13,7 @@ int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
printf("Embedded test stand. (Version 1.3, 25.05.2026)\n");
printf("Embedded test stand. (Version 1.4, 29.05.2026)\n");
g_options = CLIParser::parse(argc, argv);

View File

@@ -549,7 +549,7 @@ bool UARTFixture::validateBinaryResponse(const QByteArray& rx, const QJsonObject
if (!passed) { writeToLog(QString("%1\n%2").arg(err, errMsgMismatch) , false); break; }
}
Logger::saveTestLog(logFile, cfg, passed, err, errMsgMismatch);
Logger::saveTestLog(logFile, rx, cfg, passed, err, errMsgMismatch);
return true;
}