Skip to content

Commit 9fc7c60

Browse files
committed
fix(as5600): change angle to be relative to 360
1 parent fc71187 commit 9fc7c60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_AS5600.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class WipperSnapper_I2C_Driver_AS5600 : public WipperSnapper_I2C_Driver {
122122
WS_DEBUG_PRINTLN(" | ML: magnet too weak");
123123
return false;
124124
}
125-
_angle = (float)angle;
125+
_angle = ((float)angle / 4095.0) * 360.0;
126126
return true;
127127
}
128128

0 commit comments

Comments
 (0)