Commit e2475d521bdf608f6db4217ad5cad3a76f0f68be

Authored by 김태훈
1 parent d7c34a950c
Exists in master

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