UBCSailbot / sailbot_workspace

UBC Sailbot's monorepo
https://ubcsailbot.github.io/sailbot_workspace/main/
Apache License 2.0
4 stars 1 forks source link

Connecting CAN Frames to ROS, issue #326 #333

Closed lross03 closed 1 month ago

lross03 commented 5 months ago

Description

lross03 commented 5 months ago

In the filtered wind sensor publishing function, I was getting an error saying I was narrowing the type conversion from int to int16 when I was calculating the average direction. As far as I can tell, direction is an int16 in the custom interface, so I don't know why I was getting this error. I added a nolint (bugprone-narrowing-conversions) for now.

I also wasn't sure how to approach finding the correct generic sensor from the generic sensor custom interface, as generic sensors are not in the can_frame_parser, so I used the same method as the battery publishing function and assumed that the sensor will be in the generic_sensors array from custom interfaces.