Yaskawa-Global / motoros2

ROS 2 (rcl, rclc & micro-ROS) node for MotoPlus-compatible Yaskawa Motoman robot controllers
95 stars 16 forks source link

Reuse of error (sub)codes #60

Open ted-miller opened 1 year ago

ted-miller commented 1 year ago

There are multiple instances of the SUBCODE_FAIL_MP_NICDATA error code in different source files. Although they both essentially have the same meaning, it is impossible to know exactly which line of code raised the error. This makes troubleshooting more difficult.

We should go through and make sure that no error code is repeated anywhere in the code.

SUBCODE_FAIL_MP_NICDATA instances:

https://github.com/Yaskawa-Global/motoros2/blob/9f1c599549ca89fd4323cf47fbd3101dadf2d3d8/src/CommunicationExecutor.c#L67

and

https://github.com/Yaskawa-Global/motoros2/blob/9f1c599549ca89fd4323cf47fbd3101dadf2d3d8/src/ConfigFile.c#L134

gavanderhoorn commented 1 year ago

I've got something for this in https://github.com/Yaskawa-Global/motoros2/compare/main...gavanderhoorn:motoros2:platform_lib_update_v210.