Tic Arduino GetError Number

I am using the Tic 36v4 with an arduino uno over IC2
I am working on error handling in my code and in the library I found this notated when using tic.getErrorStatus();

/*
IntentionallyDeenergized = 0,
MotorDriverError = 1,
LowVin = 2,
KillSwitch = 3,
RequiredInputInvalid = 4,
SerialError = 5,
CommandTimeout = 6,
SafeStartViolation = 7,
ErrLineHigh = 8,
SerialFraming = 16,
RxOverrun = 17,
Format = 18,
Crc = 19,
EncoderSkip = 20,
*/

but what I get from tic.getErrorStatus() is
192
196
198

is there documented what the error codes are or am i misinterpreting things?
thanks

Hello.

The number next to each error in the code you posted is the bit associated with that error. To use your 192 value as an example, in binary, this is 11000000. Counting from the right, and starting at 0, that means that the 6th and 7th bits are high and the rest are low. Referencing the code again, we can see that the 6 and 7 bits correspond to CommandTimeout and SafeStartViolation errors.

Brandon

thank you so much for your help

2 Likes