diff --git a/app/gui/oven_control/haccp.cpp b/app/gui/oven_control/haccp.cpp index 71deb1f..316ae16 100644 --- a/app/gui/oven_control/haccp.cpp +++ b/app/gui/oven_control/haccp.cpp @@ -9,6 +9,7 @@ #include "stringer.h" #include "oven.h" +#include "config.h" namespace { @@ -25,7 +26,7 @@ struct Stamp QString caption; }; -struct Config +struct AutoCookConfig { Define::CookConfigType type; int level; @@ -36,7 +37,7 @@ struct Data QDateTime startedAt; Type type; QString autoRoot; - QList autoConfig; + QList autoConfig; int washType; QList records; } data; @@ -134,7 +135,7 @@ void error(QString code) void setConfig(Define::CookConfigType type, int level) { - data.autoConfig.append(Config{type, level}); + data.autoConfig.append(AutoCookConfig{type, level}); } void setStep(Define::StepType type) @@ -361,8 +362,6 @@ void initData(Type type) void start() { - qDebug() << __FUNCTION__; - lastMode = Define::InvalidMode; lastFan = -1; lastDoor = false; @@ -378,8 +377,6 @@ void start() void stamp(QString caption) { - qDebug() << __FUNCTION__; - if (data.type == Invalid) return; @@ -482,11 +479,10 @@ void saveData() QTextStream stream(&file); stream.setCodec("UTF-8"); - // TODO: fill them stream << "No.," << processCount << "\n"; - stream << "Typ," << "\n"; - stream << "Serial No.," << "\n"; - stream << "Version," << "\n"; + stream << "Typ," << Config::getInstance()->getProductModelName() << "\n"; + stream << "Serial No.," << Config::getInstance()->getProductSerial() << "\n"; + stream << "Version," << Config::getInstance()->getProductSWVersion() << "\n"; stream << "Time," << data.startedAt.toString("yyyy.MM.dd HH:mm:ss") << "\n"; stream << "Progr,"; @@ -556,7 +552,7 @@ void saveData() if (!data.autoConfig.isEmpty()) { - foreach (Config c, data.autoConfig) + foreach (AutoCookConfig c, data.autoConfig) stream << Define::name(c.type) << " = " << c.level << "\n";