ros-drivers / phidgets_drivers

ROS drivers for various Phidgets devices
Other
45 stars 61 forks source link

Only set magnetometer gain if param is set #170

Closed mintar closed 9 months ago

mintar commented 9 months ago

This is required because the function PhidgetSpatial_setAlgorithmMagnetometerGain is present in the Phidgets Spatial MOT0109 API (https://www.phidgets.com/?prodid=1204#Tab_API), but was removed in the MOT0110 API (https://www.phidgets.com/?prodid=1205#Tab_API). This caused an exception to be thrown on the MOT0110 (https://github.com/ros-drivers/phidgets_drivers/pull/168#issuecomment-1823622125).

This commit allows not setting the parameter on the MOT0110 and onwards, thereby avoiding the function call and the exception.