Commit 2c746c43f293f56816082b224d93f2236fd7d42d

Authored by 김태훈
1 parent 847a14c2ca
Exists in fhd

HACCP 기록 조건에 수위 변경 추가

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
app/gui/oven_control/haccp.cpp
@@ -61,6 +61,7 @@ QTime lastStampedTime; @@ -61,6 +61,7 @@ QTime lastStampedTime;
61 61
62 Define::Mode lastMode; 62 Define::Mode lastMode;
63 int lastFan; 63 int lastFan;
  64 +int lastWaterLevel;
64 bool lastDoor; 65 bool lastDoor;
65 bool lastDamper; 66 bool lastDamper;
66 bool lastSideNozzle; 67 bool lastSideNozzle;
@@ -382,6 +383,7 @@ void start() @@ -382,6 +383,7 @@ void start()
382 { 383 {
383 lastMode = Define::InvalidMode; 384 lastMode = Define::InvalidMode;
384 lastFan = -1; 385 lastFan = -1;
  386 + lastWaterLevel = -1;
385 lastDoor = false; 387 lastDoor = false;
386 lastDamper = false; 388 lastDamper = false;
387 lastSideNozzle = false; 389 lastSideNozzle = false;
@@ -431,6 +433,7 @@ void stamp(QString caption) @@ -431,6 +433,7 @@ void stamp(QString caption)
431 data.records.append(s); 433 data.records.append(s);
432 434
433 lastDoor = oven->door(); 435 lastDoor = oven->door();
  436 + lastWaterLevel = udp->waterLevel();
434 lastStampedTime.start(); 437 lastStampedTime.start();
435 } 438 }
436 439
@@ -630,6 +633,7 @@ void check() @@ -630,6 +633,7 @@ void check()
630 } 633 }
631 634
632 Oven *oven = Oven::getInstance(); 635 Oven *oven = Oven::getInstance();
  636 + UdpHandler *udp = UdpHandler::getInstance();
633 637
634 if (oven->mode() != lastMode) 638 if (oven->mode() != lastMode)
635 stampMode(oven->mode()); 639 stampMode(oven->mode());
@@ -660,6 +664,9 @@ void check() @@ -660,6 +664,9 @@ void check()
660 if (oven->door() != lastDoor) 664 if (oven->door() != lastDoor)
661 stamp(); 665 stamp();
662 666
  667 + if (udp->waterLevel() != lastWaterLevel)
  668 + stamp();
  669 +
663 if (lastStampedTime.elapsed() > 30 * 1000 - 100) 670 if (lastStampedTime.elapsed() > 30 * 1000 - 100)
664 stamp(); 671 stamp();
665 } 672 }