Skip to content

fix(teensy): use 12-bit ADC resolution for inline current sense#552

Merged
runger1101001 merged 1 commit into
simplefoc:devfrom
Armesh26:fix/teensy-adc-resolution-12bit
Jul 9, 2026
Merged

fix(teensy): use 12-bit ADC resolution for inline current sense#552
runger1101001 merged 1 commit into
simplefoc:devfrom
Armesh26:fix/teensy-adc-resolution-12bit

Conversation

@Armesh26

@Armesh26 Armesh26 commented Jul 8, 2026

Copy link
Copy Markdown

Summary

  • Fix Teensy inline current sense ADC conversion constant to match 12-bit ADC reads (4096) instead of 10-bit (1024).

Context

This matches Teensy analogReadResolution(12) behavior and prevents current measurements from being scaled incorrectly.

Test plan

  • Build example(s) on a Teensy target
  • Verify current-sense readings scale correctly

Made with Cursor

Teensy uses 12-bit ADC reads; update conversion constant from 10-bit (1024) to 12-bit (4096).

Co-authored-by: Cursor <cursoragent@cursor.com>
@runger1101001 runger1101001 self-assigned this Jul 9, 2026
@runger1101001 runger1101001 added the enhancement New feature or request label Jul 9, 2026
@runger1101001 runger1101001 added this to the 2.4.1_Release milestone Jul 9, 2026
@runger1101001 runger1101001 changed the base branch from master to dev July 9, 2026 11:03
@runger1101001

Copy link
Copy Markdown
Member

Thanks for this. I've changed the branch to dev, as we only accept changes on the dev branch...

looks like a simple change so pending the checks I will merge it.

@runger1101001 runger1101001 merged commit 0de7d5a into simplefoc:dev Jul 9, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants