Closed andresv closed 3 years ago
Here I have parse_response function that is actually the same for all responses. It would be good if this can be used in multiple places like that:
parse_response
statemachine! { *StateInit + Init / exit_command_mode = StateExitCmdMode, // exit cmd mode StateExitCmdMode + RxByte(u8) [parse_response] / enter_command_mode = StateEnterCmdMode, StateExitCmdMode + Timeout = StateEnterCmdMode, // enter cmd mode StateEnterCmdMode + RxByte(u8) [parse_response] = StateIdle, StateEnterCmdMode + Timeout = StateIdle, StateIdle + Event = StateIdle }
Hi, this should be possible! If you want to give it a try, you can have a look at the latest PR that did thus but for actions. I think it should mostly be a copy/paste exercise :)
Here I have
parse_response
function that is actually the same for all responses. It would be good if this can be used in multiple places like that: