Mode comes back as NAN when using the following;
api.ReadState(curr_state.EN_Mode());
mode = curr_state.mode;
I needed to add the following line in MoteusAPI.cpp, under mjbots::moteus::QueryResult qr = mjbots::moteus::ParseQueryResult(decoded, loopsize);
curr_state.mode = static_cast(qr.mode);
Now after installing install moteusapi after the edit, the curr_state.mode value comes back correctly.