Yaskawa-Global/motoros2

A pendant error causes failure in `Ros_Controller_GetActiveAlarmCodes`

Closed this issue · 0 comments

I got an error on the pendant because I had the wrong media-type selected.

image

Then I noticed on the debug log that it was spamming Error retrieving active alarms: -2 at a high frequency.
It stopped when I cleared the error on the pendant.

Turns out that this line is treating the "error number" as the "number of errors" instead of an error code.

if (alarmData.usAlarmNum + alarmData.usErrorNo > MAX_ALARM_COUNT + 1)

There can only ever be one error.