Commit 21aff1b818518c1c28f2733060ca23c528cd36f6
1 parent
0d34b6c351
Exists in
master
and in
2 other branches
HACCP에 시스템 정보 포함
Showing
1 changed file
with
8 additions
and
12 deletions
Show diff stats
app/gui/oven_control/haccp.cpp
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | |
| 10 | 10 | #include "stringer.h" |
| 11 | 11 | #include "oven.h" |
| 12 | +#include "config.h" | |
| 12 | 13 | |
| 13 | 14 | namespace |
| 14 | 15 | { |
| ... | ... | @@ -25,7 +26,7 @@ struct Stamp |
| 25 | 26 | QString caption; |
| 26 | 27 | }; |
| 27 | 28 | |
| 28 | -struct Config | |
| 29 | +struct AutoCookConfig | |
| 29 | 30 | { |
| 30 | 31 | Define::CookConfigType type; |
| 31 | 32 | int level; |
| ... | ... | @@ -36,7 +37,7 @@ struct Data |
| 36 | 37 | QDateTime startedAt; |
| 37 | 38 | Type type; |
| 38 | 39 | QString autoRoot; |
| 39 | - QList<Config> autoConfig; | |
| 40 | + QList<AutoCookConfig> autoConfig; | |
| 40 | 41 | int washType; |
| 41 | 42 | QList<Stamp> records; |
| 42 | 43 | } data; |
| ... | ... | @@ -134,7 +135,7 @@ void error(QString code) |
| 134 | 135 | |
| 135 | 136 | void setConfig(Define::CookConfigType type, int level) |
| 136 | 137 | { |
| 137 | - data.autoConfig.append(Config{type, level}); | |
| 138 | + data.autoConfig.append(AutoCookConfig{type, level}); | |
| 138 | 139 | } |
| 139 | 140 | |
| 140 | 141 | void setStep(Define::StepType type) |
| ... | ... | @@ -361,8 +362,6 @@ void initData(Type type) |
| 361 | 362 | |
| 362 | 363 | void start() |
| 363 | 364 | { |
| 364 | - qDebug() << __FUNCTION__; | |
| 365 | - | |
| 366 | 365 | lastMode = Define::InvalidMode; |
| 367 | 366 | lastFan = -1; |
| 368 | 367 | lastDoor = false; |
| ... | ... | @@ -378,8 +377,6 @@ void start() |
| 378 | 377 | |
| 379 | 378 | void stamp(QString caption) |
| 380 | 379 | { |
| 381 | - qDebug() << __FUNCTION__; | |
| 382 | - | |
| 383 | 380 | if (data.type == Invalid) |
| 384 | 381 | return; |
| 385 | 382 | |
| ... | ... | @@ -482,11 +479,10 @@ void saveData() |
| 482 | 479 | QTextStream stream(&file); |
| 483 | 480 | stream.setCodec("UTF-8"); |
| 484 | 481 | |
| 485 | - // TODO: fill them | |
| 486 | 482 | stream << "No.," << processCount << "\n"; |
| 487 | - stream << "Typ," << "\n"; | |
| 488 | - stream << "Serial No.," << "\n"; | |
| 489 | - stream << "Version," << "\n"; | |
| 483 | + stream << "Typ," << Config::getInstance()->getProductModelName() << "\n"; | |
| 484 | + stream << "Serial No.," << Config::getInstance()->getProductSerial() << "\n"; | |
| 485 | + stream << "Version," << Config::getInstance()->getProductSWVersion() << "\n"; | |
| 490 | 486 | stream << "Time," << data.startedAt.toString("yyyy.MM.dd HH:mm:ss") << "\n"; |
| 491 | 487 | |
| 492 | 488 | stream << "Progr,"; |
| ... | ... | @@ -556,7 +552,7 @@ void saveData() |
| 556 | 552 | |
| 557 | 553 | if (!data.autoConfig.isEmpty()) |
| 558 | 554 | { |
| 559 | - foreach (Config c, data.autoConfig) | |
| 555 | + foreach (AutoCookConfig c, data.autoConfig) | |
| 560 | 556 | stream << Define::name(c.type) |
| 561 | 557 | << " = " |
| 562 | 558 | << c.level << "\n"; | ... | ... |