From 5c47ed4e87c6fababa3b4fa5901a2bd03f96f07f Mon Sep 17 00:00:00 2001 From: Ronen Sberlo Date: Tue, 20 Oct 2020 12:19:48 +0300 Subject: change fan numbers to enum --- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Heaters') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c index 8f00dbe47..af28fa018 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c @@ -243,7 +243,7 @@ void ArcHeadAlarms(void) count2 = (count2 < 0)?(0):(count2); } - if (HeadBlowersGetRPM(0) < 2000) { + if (HeadBlowersGetRPM(HEAD_FAN_RIGHT) < 2000) { if (++count3 == ARC_ALARM_LIMIT) AlarmHandlingSetAlarm(EVENT_TYPE__DYEING_HEAD_BLOWER_1_FAN_RPM_TOO_LOW, true); count3 = (count3 > ARC_ALARM_LIMIT)?(ARC_ALARM_LIMIT):(count3); @@ -252,7 +252,7 @@ void ArcHeadAlarms(void) AlarmHandlingSetAlarm(EVENT_TYPE__DYEING_HEAD_BLOWER_1_FAN_RPM_TOO_LOW, false); count3 = (count3 < 0)?(0):(count3); } - if (HeadBlowersGetRPM(1) < 2000) { + if (HeadBlowersGetRPM(HEAD_FAN_LEFT) < 2000) { if (++count4 == ARC_ALARM_LIMIT) AlarmHandlingSetAlarm(EVENT_TYPE__DYEING_HEAD_BLOWER_2_FAN_RPM_TOO_LOW, true); count4 = (count4 > ARC_ALARM_LIMIT)?(ARC_ALARM_LIMIT):(count4); @@ -366,7 +366,7 @@ double PressureSensorGetPressure(uint8_t SensorId) double V0, Vm, Q, Cp; Cp = PRESSURE_SENSOR_CP; - V0 = (SensorId == HEAD_PT100_ZONE_5_0X84_0)?(PressureSensorV0[0]):(PressureSensorV0[1]); + V0 = (SensorId == HEAD_PT100_ZONE_5_0X84_0)?(PressureSensorV0[HEAD_FAN_RIGHT]):(PressureSensorV0[HEAD_FAN_LEFT]); Vm = (double)(MillisecGetTemperatures(SensorId)); Vm /= 10.0; Q = sqrt(Vm - V0 + 22) * Cp; @@ -375,7 +375,7 @@ double PressureSensorGetPressure(uint8_t SensorId) uint32_t HeadBlowerCommandRequestMessage(int blowerId, float flow) { - if ((blowerId < HEAD_FAN_RIGHT) || (blowerId > HEAD_FAN_LEFT)) { + if ((blowerId != HEAD_FAN_RIGHT) && (blowerId != HEAD_FAN_LEFT)) { ReportWithPackageFilter(HeatersFilter,"blowerId not in range",__FILE__,__LINE__,blowerId,RpError, 0,0); return ERROR; } -- cgit v1.3.1