From 535b90dc450d521e9567dbed050e411f91efdc50 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 8 Aug 2018 19:12:19 +0300 Subject: fixes to the pressure calculation --- Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c index 6312c701e..1efce00e3 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c @@ -35,9 +35,9 @@ void Calculateinit (void) Bits_0Pascal = Vlow * 4096 / 3; // Vlow * 4096bit / 3Vref = 709.973328 bits Bits_1MPascal = VHigh * 4096 / 3; // VHigh * 4096bit / 3Vref = 3549.86646 bits - a = (Bits_1MPascal - Bits_0Pascal) / (1 - 0) ;// Mpascal/Bits = 2839.89307 + a = (1 - 0) / (Bits_1MPascal - Bits_0Pascal);// Mpascal/Bits = 0.000352125 - b = Bits_0Pascal - (a * 0 ); //709.973328 + b = 0 - (a * Bits_0Pascal ); // y = ax + b (x= Bits_0Pascal, y = 0) } float CalculateDispenserPressure (int DispenserId) @@ -58,7 +58,7 @@ float CalculateDispenserPressure (int DispenserId) if(data