 uint8_t rssi_scaled = 0;
 #ifdef USE_DIVERSITY
 uint8_t diversity_mode = useReceiverAuto;
+uint8_t active_receiver = useReceiverA;
 #endif
 uint8_t hight = 0;
 uint8_t state = START_STATE;

#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)

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