public static byte[] getXmitBytes(ROJoystickHandler joystickHandler, boolean heartbeat) {
    	byte messageType;
    	if (heartbeat)
    		messageType = ROMessageTypes.HEARTBEAT_PACKET;
    	else
    		messageType = ROMessageTypes.CONTROL_PACKET;
    	
        byte[] header = { messageType };
        if (!heartbeat) {
        	byte[] joystickPayload = combineByteArrays(header, joystickHandler.exportValues());
        	byte[] checksum = CRC16.genCRC16(joystickPayload);
        	return combineByteArrays(joystickPayload, checksum);
        }
        else {
        	byte[] body = {(byte)0xEE, (byte)0x01};
        	return combineByteArrays(header, body);
        }
    }