 #ifdef USE_DIVERSITY
     return readRSSI(-1);
 }
-uint16_t readRSSI(uint8_t receiver)
+uint16_t readRSSI(char receiver)
 {
 #endif
     uint16_t rssi = 0;

#endif
    for (uint8_t i = 0; i < 10; i++)
    {
        rssiA += analogRead(rssiPinA);

#ifdef USE_DIVERSITY
        rssiB += analogRead(rssiPinB);
#endif
    }
    rssiA = rssiA/10; // average of 10 readings

#ifdef USE_DIVERSITY
    rssiB = rssiB/10; // average of 10 readings
    if(receiver == -1) // no receiver was chosen using diversity
    {
        switch(diversity_mode)

            default:
                receiver=useReceiverA;
        }
        active_receiver = receiver;
        // set the antenna LED and switch the video
        setReceiver(receiver);
    }
#endif

#ifdef USE_DIVERSITY
    if(receiver == useReceiverA || state==STATE_RSSI_SETUP)
    {
#endif
        rssi = rssiA;
#ifdef USE_DIVERSITY
    }
    else {
        rssi = rssiB;
    }
#endif
    return (rssi);
