How to print IMUAxis value to Shuffleboard

How do you print the axis values to Shuffleboard. The method putNumber only accepts doubles and we don’t know if we should use another method or somehow convert the IMU Axis value to a double.

You’re using a customized version of the class so I don’t know the exact functions, but looking at the mouseover docs, GetPitchAxis() just gives you an enumerated value telling you which axis is configured to be the pitch, it doesn’t actually give you the pitch axis value (e.g. angle). You probably want something like getPitchAngle() (assuming that’s a function on the class).

If you really want the IMUAxis enumerated value as a number, you’ll need to write a function that converts the enumerated value (kX, kY, kZ) to 0, 1, 2 or similar (or a string might be a better choice here).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.