Index: drydemo.pro =================================================================== diff -u -rf91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec -ra3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8 --- drydemo.pro (.../drydemo.pro) (revision f91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec) +++ drydemo.pro (.../drydemo.pro) (revision a3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8) @@ -112,12 +112,14 @@ sources/Threads.h \ sources/MainTimer.h \ \ # Controllers + sources/storage/Settings.h \ \ # ---------- Models ---------- sources/model/MAbstract.h \ sources/model/MAbstractDynamic.h \ \ # ---------- Models - confirm \ # ---------- Models - POST \ # ---------- Models - settings + sources/model/settings/MSettings.h \ \ # ---------- Models - Alarm \ # ---------- Models - States Data \ # ---------- Models - HD - Adjustment @@ -164,6 +166,8 @@ \ # ---------- Views - DG - States \ # ---------- Views - DG - Data \ # Storage + sources/storage/StorageGlobals.h \ + sources/storage/FileHandler.h \ \ # Utility sources/utility/crc.h \ sources/utility/format.h \ @@ -181,6 +185,7 @@ \ # ---------- Models ---------- sources/model/MAbstract.cpp \ sources/model/MAbstractDynamic.cpp \ + sources/storage/Settings.cpp \ \ # ---------- Models - CONFIRM \ # ---------- Models - POST \ # ---------- Models - settings @@ -215,6 +220,7 @@ \ # ---------- Views - POST \ # ---------- Views - Alarm \ # ---------- Views - Settings + sources/model/settings/MSettings.cpp \ \ # ---------- Views - HD - Adjustment \ # ---------- Views - HD - Adjustment - common \ # ---------- Views - HD - Adjustment - Pre-Treatment @@ -232,6 +238,8 @@ \ # ---------- Views - DG - States \ # ---------- Views - DG - Data \ # Storage + sources/storage/StorageGlobals.cpp \ + sources/storage/FileHandler.cpp \ \ # Utility sources/utility/crc.cpp \ sources/utility/format.cpp \ Index: drydemo.pro.user =================================================================== diff -u -rf91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec -ra3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8 --- drydemo.pro.user (.../drydemo.pro.user) (revision f91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec) +++ drydemo.pro.user (.../drydemo.pro.user) (revision a3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8) @@ -1,6 +1,6 @@ - + EnvironmentId Index: main.cpp =================================================================== diff -u -rf91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec -ra3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8 --- main.cpp (.../main.cpp) (revision f91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec) +++ main.cpp (.../main.cpp) (revision a3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8) @@ -46,6 +46,7 @@ #include "MessageAcknowModel.h" #include "MessageDispatcher.h" +#include "Settings.h" #include "Threads.h" #include "drydemostates.h" Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -rf91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec -ra3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision f91ee3bac4f77fc7a0fe8d122c8c49b34b6984ec) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision a3c0d4e8bdd6bc44ad648afaba34ac33bcc46ad8) @@ -20,6 +20,7 @@ // Project #include "format.h" +#include "Settings.h" using namespace Can; @@ -403,8 +404,16 @@ */ void MessageInterpreter::updateUnhandledMessages() { - // TODO is this needed? - qDebug() << "Update"; + QString category = Storage::Settings_Category_MessagesUnhandled; + QStringList groups = _Settings.groups(category); + // DEBUG: qDebug() << groups; + for(const auto &group: qAsConst(groups)) { + bool ok; + quint16 id = QString(group).toUInt(&ok,16); + if (!ok) continue; + _messageList[ id ] = _Settings.keys(category, group); + // DEBUG: qDebug() << _Settings.keys(group); + } } /*! @@ -482,6 +491,7 @@ //if ( gDisableUnhandledReport ) { // if the unhandled message error has been disabled, return. // LOG_DEBUG(QString("Undefined unhandled message [%1]").arg(id, 0, 16)); //} // TODO is this needed? + qDebug() << "H" + logString; } return ok; }