Fixed issue with button status and jittery grip

Firmware was not correctly handling packets shorter than 16 bytes. Specifically, a packet of 14 bytes was placing a '>' in the position relating to button and homing status, which was not being detected (since another '>' was still in the 16th position from the last read, such that it still appeared as a valid 16-byte packet), resulting in spurious results (namely homing status = 7 and grip info = 13).

Also optimized the code a little.