Help with program function calls

I want to control a stepper motor, so the msg format is #nnnn-x\n, # just a chr to verify a valid msg with the serial string ending with '\n'. nnnn is the number steps and x represents a control chr for the A4988 stepper controller (step size, step direction, chip enable).

The stepper controller requires a pulse to make a single step which is nnnn. I have this working ok using a timer interrupt.

All seems to work ok except for the if statement inside the function processCmd. Would it be better if I called this function from void Loop() instead of from within the previous function?

I've read a bit regarding string.h so I might give it another shot!

Bodge Out