Blue tooth connecting to labview Partial packet issue. NEED HELP ASAP

Hello, i am having an issue with my code it will not run if a partial packet is sent if you could take a look at it i used some of the Bluetooth functions and left some comments. I plan on using a checksum but i am stuck on what i need to use for the checksum and how to do it. If you could take a look i am sending a string through Bluetooth to control a series of servos from lab-view. I cannot figure out how i can get this to work. also the Bluetooth module will not stay connected to the computer long term. I may change to wifi but have no idea with arduous nano if i need a WiFi sheild or not to program with either labveiw and or arduino. I am automating a piece of scaled mining equipment for a research project and i am stuck bad on this.

registerEngineFunctions.ino (1.94 KB)

registerEngineHC05PWM-wChksum.ino (3.98 KB)

servoFunctions.ino (495 Bytes)

it will not run if a partial packet is sent

So, why would you send a partial packet to it?

I got lost parsing your post, because you failed to use periods at the end of sentences and capital letters at the beginning.

There is no excuse for pissing away resources using the String class like you do. C strings, NULL terminated char arrays, are so much better.

  if (rxIndex == 8){
    rxIndex = 0;//ready to overwrite old array next time around
    
    String mode;
    int pin, val;
    bool valid = parseRX(rx, mode, pin, val);

parseRx expects a 12 element array. The comments in the function show that it is expecting 9 characters to be in the array.

Do you really need an int to hold the index into an 8 element array? Maybe you should be using a different type, like float or long long.