     writeToRadio(data);
 
     //Write packet ID
-    writeToRadio(getPacketId());
+    writeToRadio(qspGetPacketId());
 
     //Write payload
     for (uint8_t i = 0; i < length; i++) {


    uint32_t currentMillis = millis();

    /*
     * RC_DATA QSP frame
     */
    if (currentMillis - lastRcFrameTransmit > TX_RC_FRAME_RATE && !transmitPayload) {
        lastRcFrameTransmit = currentMillis; 

        clearQspPayload();
        encodeRcDataPayload(&ppmReader, PPM_CHANNEL_COUNT);
        qspFrameToSend = QSP_FRAME_RC_DATA;



        if (qspCrc == incomingByte) {
            //CRC is correct

            switch (frameId) {
                case QSP_FRAME_RC_DATA:
                    qspDecodeRcDataFrame();
                    break;

                default:
                    //Unknown frame
                    //TODO do something in this case
                    break;
            }

        } else {
            //CRC failed, frame has to be rejected
            //TODO do something in this case or something
        }

        // In both cases switch to listening for next preamble
