diff options
| author | Ronen Sberlo <ronen.s@twine-s.com> | 2020-11-03 15:35:21 +0200 |
|---|---|---|
| committer | Ronen Sberlo <ronen.s@twine-s.com> | 2020-11-03 15:35:21 +0200 |
| commit | 824a4dba856dd575ed076d8e707ef59b39940932 (patch) | |
| tree | 1bc1a738276aefc99d2ff0f19f506c2b0fe4c4f8 /Software/Embedded_SW/Embedded/Modules/Heaters | |
| parent | 7c5013e09cafac9a7f027b5b9b8d1352cb794d24 (diff) | |
| download | Tango-824a4dba856dd575ed076d8e707ef59b39940932.tar.gz Tango-824a4dba856dd575ed076d8e707ef59b39940932.zip | |
change in Q calculation
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Heaters')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c index 3c626ac22..69ac7fbb3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c @@ -51,6 +51,7 @@ #define ARC_ALARM_LIMIT 3 #define PRESSURE_SENSOR_CP 0.269 +#define PRESSURE_SENSOR_B 1.6668 extern uint16_t Head_Fan_Tach[2]; extern uint8_t Head_Fan_PWM_Command[2]; @@ -369,15 +370,14 @@ int HeadBlowersGetPWM(uint8_t blowerId) double PressureSensorGetPressure(uint8_t SensorId) { - double V0, Vm, Q, Cp; + double V0, Vm, Q; int FanId; - Cp = PRESSURE_SENSOR_CP; FanId = HeadBlowerSensorIdToFanId(SensorId); V0 = PressureSensorV0[FanId]; Vm = (double)(MillisecGetTemperatures(SensorId)); Vm /= 10.0; - Q = sqrt(Vm - V0 + 22) * Cp; + Q = (sqrt(Vm - V0 + 22) - PRESSURE_SENSOR_B) * PRESSURE_SENSOR_CP; return Q; } |
