Fixed negative temperature bug

This commit is contained in:
doppelhub
2026-04-20 15:45:44 -04:00
parent 49abd4c721
commit 2b4932080f
3 changed files with 8 additions and 4 deletions

View File

@@ -7,8 +7,8 @@
#define config_h #define config_h
#include "src/libcm.h" #include "src/libcm.h"
#define FW_VERSION "0.9.6a" #define FW_VERSION "0.9.6b"
#define BUILD_DATE "2026APR03" #define BUILD_DATE "2026APR20"
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////

View File

@@ -283,7 +283,11 @@ void printVspoofInstructions(void)
"\n -'$MDV=_ : +/-/0: adjust OBDIIC&C parameter 0x05" "\n -'$MDV=_ : +/-/0: adjust OBDIIC&C parameter 0x05"
"\n -'$SPF=_ : +/-/0: adjust LiBCM's max allowed VpackSpoof" "\n -'$SPF=_ : +/-/0: adjust LiBCM's max allowed VpackSpoof"
"\n" "\n"
"\nCalibration instructions:" "\nGoal: Use these commands to make all three voltages identical."
"\nNote: These are analog signals, so might not change with each adjustment."
"\nRecommendation: Adjust BVO first. Decrease SPF if BVO doesn't change after a couple tries."
"\n"
"\nDetailed instructions:"
"\n 0: KeyON, engine off, IMA light must remain off throughout test" "\n 0: KeyON, engine off, IMA light must remain off throughout test"
"\n 1: Configure OBDIIC&C to display BVO parameter 0x0A" "\n 1: Configure OBDIIC&C to display BVO parameter 0x0A"
"\n 2: Configure OBDIIC&C to display MDV parameter 0x05" "\n 2: Configure OBDIIC&C to display MDV parameter 0x05"

View File

@@ -439,7 +439,7 @@ int8_t temperature_measureOneSensor_degC(uint8_t thermistorPin)
tempMeasured_celsius = ((tempMeasured_celsius * 5) >> 2) - 5; //actual: countsADC = countsADC * 1.225 - 4; tempMeasured_celsius = ((tempMeasured_celsius * 5) >> 2) - 5; //actual: countsADC = countsADC * 1.225 - 4;
} }
return (uint8_t)tempMeasured_celsius; return (int8_t)tempMeasured_celsius;
} }
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////