diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-05 17:15:49 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-05 17:15:49 +0200 |
| commit | 2f01062dca5a8e1bb9388cd4420d39125ebd3561 (patch) | |
| tree | ee4c364007b467aa5a8e628269e154c5c2415c9f /Software/Embedded_SW/Embedded/Modules/Heaters | |
| parent | dd646f34a3108d5321ea2d09e5ba807d6ee50240 (diff) | |
| download | Tango-2f01062dca5a8e1bb9388cd4420d39125ebd3561.tar.gz Tango-2f01062dca5a8e1bb9388cd4420d39125ebd3561.zip | |
alarm handling improved, including fan alarms
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Heaters')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c index ba4749f13..59a0aee51 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c @@ -316,14 +316,15 @@ void HeadBlowersControlLoop () int blowerId; static int count[2] = {0, 0}; - ArcHeadAlarms(); - if (GetMachineState() < MACHINE_STATE_WAIT_FOR_COOLER) return; //do not start before controller is initialized and running if (!HeadBlowersEnable) { return; } + + ArcHeadAlarms(); + for (blowerId = 0; blowerId <= 1; blowerId++) { if (count[blowerId] == HeadBlowersCloseLoopTime[blowerId]) { count[blowerId] = 0; @@ -377,6 +378,8 @@ double PressureSensorGetPressure(uint8_t SensorId) V0 = PressureSensorV0[FanId]; Vm = (double)(MillisecGetTemperatures(SensorId)); Vm /= 10.0; + if ((Vm - V0 + 22)<0) + return 0.0; Q = sqrt(Vm - V0 + 22) * PRESSURE_SENSOR_CP - PRESSURE_SENSOR_B; return Q; } |
