From 0e318eab7cb4cb030aabf4262e9101c1c774ed5d Mon Sep 17 00:00:00 2001 From: Foodbandlt Date: Mon, 22 Apr 2019 03:31:52 -0400 Subject: [PATCH] Fixing debug vars in case they ever want to be used again Integer result needs to be cast to a float to obtain a float result from division. --- .../Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino index 4b3c02f..405e5c4 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino @@ -489,14 +489,14 @@ void loop() { diffCompH = (compInt - VComp) - Hyst; //diffCompL = VComp - compLowInt; //diffCompH = compHighInt - VComp; - //VCompRef = (VComp * 5) / 1024; + //VCompRef = (float)(VComp * 5) / 1024; VAdj = analogRead(V_FOLLOW_PIN); diffAdjL = (VAdj - senseInt) - Hyst; diffAdjH = (senseInt - VAdj) - Hyst; //diffAdjL = VAdj - senseLowInt; //diffAdjH = senseHighInt - VAdj; - //vAdjRead = (VAdj * 5) / 1024; + //vAdjRead = (float)(VAdj * 5) / 1024; // Set the amplification gain factor