diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_function.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_function.h index 9fe4e44..67831e9 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_function.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_function.h @@ -60,9 +60,8 @@ update the voltMeterConstant variable in pP_config.h with the correct value*/ void readVin() { VOld = Vin; Vin = readVcc(), DEC; - senseLong = senseThrs * 1024L; - compLong = compThrs * 1024L; - senseInt = (long long) senseLong / Vin; + followerLong = followerThrs * 1023L; + compLong = compThrs * 1023L; compInt = (long long) compLong / Vin; senseInt = (int) senseInt; compInt = (int) compInt; diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h index 2eeb31d..1eee7e2 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_serial.h @@ -55,6 +55,7 @@ void identifyMarkers() { #endif } +/*------------------------------------------------*/ void updateGainFactor() { if (serialInt >= 0) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_volatile.h b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_volatile.h index a1319e8..0faf218 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_volatile.h +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/pP_volatile.h @@ -10,9 +10,7 @@ int VLast = 0; // Convert threshold values based on the input voltage -long senseLong = senseThrs * 1024L; -long compLong = compThrs * 1024L; -long senseInt; +long followerLong = followerThrs * 1023L; long compInt; // Voltage Comparator Adjustment parameters