Read requested state in Arduino

I would like to read requested state from odrive board.
For example: I would like to know if Odrive is in AXIS_STATE_CLOSED_LOOP_CONTROL or in IDLE.
But when I run that command over serial I receive 0. But I know that motors are in for example AXIS_STATE_CLOSED_LOOP_CONTROL state. Can someone help ?

float queryRequestedState() {
    serial_odrive << "r axis0.requested_state\n";
    return odrive.readFloat();
}

Try current_state :wink:

2 Likes