From 2b4932080f2bf66b982c5157db9e6401c196a09f Mon Sep 17 00:00:00 2001 From: doppelhub Date: Mon, 20 Apr 2026 15:45:44 -0400 Subject: [PATCH] Fixed negative temperature bug --- Firmware/firmwareLiBCM/config.h | 4 ++-- Firmware/firmwareLiBCM/src/USB_userInterface.cpp | 6 +++++- Firmware/firmwareLiBCM/src/temperature.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Firmware/firmwareLiBCM/config.h b/Firmware/firmwareLiBCM/config.h index 0ac249c..745ce1d 100644 --- a/Firmware/firmwareLiBCM/config.h +++ b/Firmware/firmwareLiBCM/config.h @@ -7,8 +7,8 @@ #define config_h #include "src/libcm.h" - #define FW_VERSION "0.9.6a" - #define BUILD_DATE "2026APR03" + #define FW_VERSION "0.9.6b" + #define BUILD_DATE "2026APR20" ////////////////////////////////////////////////////////////////// diff --git a/Firmware/firmwareLiBCM/src/USB_userInterface.cpp b/Firmware/firmwareLiBCM/src/USB_userInterface.cpp index 552f392..928b1bc 100644 --- a/Firmware/firmwareLiBCM/src/USB_userInterface.cpp +++ b/Firmware/firmwareLiBCM/src/USB_userInterface.cpp @@ -283,7 +283,11 @@ void printVspoofInstructions(void) "\n -'$MDV=_ : +/-/0: adjust OBDIIC&C parameter 0x05" "\n -'$SPF=_ : +/-/0: adjust LiBCM's max allowed VpackSpoof" "\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 1: Configure OBDIIC&C to display BVO parameter 0x0A" "\n 2: Configure OBDIIC&C to display MDV parameter 0x05" diff --git a/Firmware/firmwareLiBCM/src/temperature.cpp b/Firmware/firmwareLiBCM/src/temperature.cpp index 2246eac..74ddaec 100644 --- a/Firmware/firmwareLiBCM/src/temperature.cpp +++ b/Firmware/firmwareLiBCM/src/temperature.cpp @@ -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; } - return (uint8_t)tempMeasured_celsius; + return (int8_t)tempMeasured_celsius; } /////////////////////////////////////////////////////////////////////////////////////////