Skip to content

Conversation

@kacper-uminski
Copy link
Contributor

@kacper-uminski kacper-uminski commented Aug 14, 2025

Hi!

This fixes offset translation for Feetech STS servos (fixes #96), making it continuous from -180 to 180 degrees. One can now set a new zero position by simply setting the offset to 0, reading the current position, and writing it to the offset, which previously broke on negative positions and required one to negate positive positions.

I have tested this to work on the STS3215.

A breaking change this introduces is changing the register type for offset from i16 to u16, which changes the signature for read_raw_offset, write_raw_offset and sync_write_raw_offset to take u16 instead of i16. I feel that this is a worthwhile change, as the register is never interpreted as a signed integer, just an unsigned magnitude (0--2047) and a direction bit (bit 11). I am interpreting the direction bit as positive low and negative high.

@pierre-rouanet
Copy link
Member

Thanks again for your contributions @kacper-uminski 💯 !

@pierre-rouanet pierre-rouanet merged commit 3a553a4 into pollen-robotics:develop Aug 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Offset handled incorrectly for Feetech STS.

2 participants