From 40e8f6b6d23f17d028ee479e55cd7415e294d5f5 Mon Sep 17 00:00:00 2001 From: armesh26 Date: Wed, 8 Jul 2026 14:12:35 +0530 Subject: [PATCH] fix(teensy): use 12-bit ADC resolution for inline current sense Teensy uses 12-bit ADC reads; update conversion constant from 10-bit (1024) to 12-bit (4096). Co-authored-by: Cursor --- src/current_sense/hardware_specific/teensy/teensy_mcu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/current_sense/hardware_specific/teensy/teensy_mcu.cpp b/src/current_sense/hardware_specific/teensy/teensy_mcu.cpp index 7669edc8..1b5004fd 100644 --- a/src/current_sense/hardware_specific/teensy/teensy_mcu.cpp +++ b/src/current_sense/hardware_specific/teensy/teensy_mcu.cpp @@ -3,7 +3,7 @@ #if defined(__arm__) && defined(CORE_TEENSY) #define _ADC_VOLTAGE 3.3f -#define _ADC_RESOLUTION 1024.0f +#define _ADC_RESOLUTION 4096.0f // function reading an ADC value and returning the read voltage void* _configureADCInline(const void* driver_params, const int pinA,const int pinB,const int pinC){