hw/sw-version: always store different version than current onew

This commit is contained in:
Gerhard Hoffmann 2024-02-05 14:50:17 +01:00
parent 100ada06f8
commit ef31911e74

View File

@ -64,7 +64,8 @@ bool indat_isMdbOn()
void gpi_storeHWver(QString text)
{
if (qstrlen(SharedMem::read()->indat_HWversion) == 0) {
QString hwVersion((char const *)SharedMem::read()->indat_HWversion);
if (hwVersion != text) {
char const *p = text.toUtf8().constData();
if (qstrlen(p) > 0) {
memset(SharedMem::write()->indat_HWversion, 0, versionBufferLen);
@ -72,6 +73,8 @@ void gpi_storeHWver(QString text)
qMin((uint)versionBufferLen, qstrlen(p)) - 1);
}
}
qCritical() << "HW TEXT" << epi_loadHWver();
}
QString epi_loadHWver(void)
@ -80,8 +83,9 @@ QString epi_loadHWver(void)
}
void gpi_storeSWver(QString text)
{
if (qstrlen(SharedMem::read()->indat_SWversion) == 0) {
{
QString swVersion((char const *)SharedMem::read()->indat_SWversion);
if (swVersion != text) {
char const *p = text.toUtf8().constData();
if (qstrlen(p) > 0) {
memset(SharedMem::write()->indat_SWversion, 0, versionBufferLen);
@ -89,6 +93,8 @@ void gpi_storeSWver(QString text)
qMin((uint)versionBufferLen, qstrlen(p)) - 1);
}
}
qCritical() << "SW TEXT" << epi_loadSWver();
}
QString epi_loadSWver(void)