Here is an example of reading your RF data that doesn't block. It reads as much as it can and then returns. The main code deals with the packet when GOT_RF_DATA is true. You need to to similar things with your movement.
//##############################################################################
// Read whole RF character string, "boxed" by RFStart, RFEnd codes.
void GetAllRFText(void) {
// following are RF Data Block delimiters
const char RFStart = 0x02; // "STX" = Start of RF data block
const char RFEnd = 0x17; // "ETB" = End of RF data block
static bool waiting = true; // true = waiting for start, false = in packet reception
static byte idx = 0;
byte RF_Char;
// if any RF data now available,look for start character
// whole packet is read
while (Serial1.available()) {
byte RF_Char = Serial1.read();
if ( waiting ) {
if (RF_Char == RFStart) {
// Start of data seen, Flag this, then read till end of data
waiting = false;
idx = 0;
GOT_RF_DATA = false;
}
}
else {
if (RF_Char != RFEnd) {
// this char is content of packet
RFText[idx] = RF_Char;
idx++;
if (idx >= MaxChars) idx = MaxChars - 1;
}
else {
// indicates end of data packet
RFText[idx] = '\0'; // terminate the data string
waiting = true;
GOT_RF_DATA = true;
}
}
}
}
You probably need some sort of flag to indicate you are busy moving and then, if the flag is set, just discard the RF packet else use it.