Skip to content

fix: Ensure float32 for encoder radius and CPR#1

Merged
SONOBOTICS-paddy merged 1 commit into
Sonobotics:mainfrom
h-brenne:fix/encoder_param_float_promotion
May 15, 2026
Merged

fix: Ensure float32 for encoder radius and CPR#1
SONOBOTICS-paddy merged 1 commit into
Sonobotics:mainfrom
h-brenne:fix/encoder_param_float_promotion

Conversation

@h-brenne
Copy link
Copy Markdown
Contributor

What?

Build the EncoderRadiusCpr constant directly in float32, fixing an issue of a large garbage constant being set.

Why?

np.pi is a float64, which promoted the result to float64. Only the lower 4 bytes of the resulting float64 is sent, producing an unusable value when reinterpreted as float32.

@SONOBOTICS-paddy SONOBOTICS-paddy merged commit 02b78cc into Sonobotics:main May 15, 2026
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.

2 participants