Error message enums on RazorsEdge

Hi,

On @wetmelon / RazorsEdge branch, I notice that the error messages are broken. For example, I am currently getting:

In [488]: dump_errors(odrv0, True)
axis0
  axis: no error
  motor: no error
  encoder: no error
  controller: no error
axis1
  axis: Error(s):
    UNKNOWN_ERROR!
    ERROR_INVALID_STATE
    ERROR_DC_BUS_UNDER_VOLTAGE
    ERROR_DC_BUS_OVER_VOLTAGE
    ERROR_CURRENT_MEASUREMENT_TIMEOUT
    ERROR_BRAKE_RESISTOR_DISARMED
    ERROR_MOTOR_DISARMED
    ERROR_MOTOR_FAILED
    ERROR_SENSORLESS_ESTIMATOR_FAILED
    ERROR_ENCODER_FAILED
    ERROR_CONTROLLER_FAILED
    ERROR_POS_CTRL_DURING_SENSORLESS
    ERROR_WATCHDOG_TIMER_EXPIRED
  motor: Error(s):
    UNKNOWN_ERROR!
    ERROR_PHASE_RESISTANCE_OUT_OF_RANGE
    ERROR_PHASE_INDUCTANCE_OUT_OF_RANGE
    ERROR_ADC_FAILED
    ERROR_DRV_FAULT
    ERROR_CONTROL_DEADLINE_MISSED
    ERROR_NOT_IMPLEMENTED_MOTOR_TYPE
    ERROR_BRAKE_CURRENT_OUT_OF_RANGE
    ERROR_MODULATION_MAGNITUDE
    ERROR_BRAKE_DEADTIME_VIOLATION
    ERROR_UNEXPECTED_TIMER_CALLBACK
    ERROR_CURRENT_SENSE_SATURATION
    ERROR_CURRENT_LIMIT_VIOLATION
  encoder: no error
  controller: no error

I believe the error above should just be ERROR_CURRENT_LIMIT_VIOLATION.

I noticed there is a branch called ‘enable_large_enums’. I tried patching this in, but it doesn’t seem to make a difference.

https://github.com/madcowswe/ODrive/compare/sam_enable_large_enums

@Wetmelon any suggestions?

Cheers,
Tom

Try using the odrivetool from the /tools directory (developer preview) instead of the “standard” one. Or double check that you’re running v4.11 of odrivetool (pip install odrive --upgrade)

Hi @Wetmelon, thanks.

I am simply running tools/odrivetool in the Git repo directory that I cloned from RazorsEdge. Maybe Python is picking up libraries from the wrong place though. I don’t know.

This is true for three different host machines and two different ODrive boards both running RazorsEdge though, so it would seem to be an easily reproducible bug.

edit:
also, odrivetool says:
ODrive control utility v0.4.11.dev