 
 #define EEPROM_ADR_STATE 0
 #define EEPROM_ADR_TUNE 1
-#define EEPROM_ADR_RSSI_MIN_L 2
-#define EEPROM_ADR_RSSI_MIN_H 3
-#define EEPROM_ADR_RSSI_MAX_L 4
-#define EEPROM_ADR_RSSI_MAX_H 5
+#define EEPROM_ADR_RSSI_MIN_A_L 2
+#define EEPROM_ADR_RSSI_MIN_A_H 3
+#define EEPROM_ADR_RSSI_MAX_A_L 4
+#define EEPROM_ADR_RSSI_MAX_A_H 5
 #ifdef USE_DIVERSITY
 #define EEPROM_ADR_DIVERSITY 6
+#define EEPROM_ADR_RSSI_MIN_B_L 7
+#define EEPROM_ADR_RSSI_MIN_B_H 8
+#define EEPROM_ADR_RSSI_MAX_B_L 9
+#define EEPROM_ADR_RSSI_MAX_B_H 10
 #endif
 //#define DEBUG
 

            {
                case useReceiverAuto:
                    TV.draw_rect(8,3+1*MENU_Y_SIZE,100,12,  WHITE, INVERT); // auto
                    //digitalWrite(receiverA_led, HIGH);
                    //digitalWrite(receiverB_led, HIGH);
                    break;
                case useReceiverA:
                    TV.draw_rect(8,3+2*MENU_Y_SIZE,100,12,  WHITE, INVERT); // receiver a

    // special case for RSSI setup
    if(state==STATE_RSSI_SETUP)
    { // RSSI setup
        if(rssiA < rssi_setup_min_a)
        {
            rssi_setup_min_a=rssiA;
            TV.print(50, SCANNER_LIST_Y_POS, "   ");
            TV.print(50, SCANNER_LIST_Y_POS, rssi_setup_min_a , DEC);
        }
        if(rssiA > rssi_setup_max_a)
        {
            rssi_setup_max_a=rssiA;
            TV.print(110, SCANNER_LIST_Y_POS, "   ");
            TV.print(110, SCANNER_LIST_Y_POS, rssi_setup_max_a , DEC);
        }
#ifdef USE_DIVERSITY
        if(rssiB < rssi_setup_min_b)
        {
            rssi_setup_min_b=rssiB;
        }
        if(rssiB > rssi_setup_max_b)
        {
            rssi_setup_max_b=rssiB;
        }
#endif
    }

#ifdef USE_DIVERSITY
    if(receiver == useReceiverA || state==STATE_RSSI_SETUP)
    {
        rssi = constrain(rssiA, rssi_min_a, rssi_max_a);    //original 90---250
        rssi=rssi-rssi_min_a; // set zero point (value 0...160)
        rssi = map(rssi, 0, rssi_max_a-rssi_min_a , 1, 100);   // scale from 1..100%
    }
    else {
        rssi = constrain(rssiB, rssi_min_b, rssi_max_b);    //original 90---250
        rssi=rssi-rssi_min_b; // set zero point (value 0...160)
        rssi = map(rssi, 0, rssi_max_a-rssi_min_b , 1, 100);   // scale from 1..100%
    }
#else
    rssi = constrain(rssiA, rssi_min_a, rssi_max_a);    //original 90---250
    rssi=rssi-rssi_min_a; // set zero point (value 0...160)
    rssi = map(rssi, 0, rssi_max_a-rssi_min_a , 1, 100);   // scale from 1..100%
#endif
    return (rssi);
}

#ifdef USE_DIVERSITY
void setReceiver(uint8_t receiver) {
    if(receiver == useReceiverA)
    {
        digitalWrite(receiverA_led, HIGH);
        digitalWrite(receiverB_led, LOW);
    }
    else
    {
        digitalWrite(receiverB_led, HIGH);
        digitalWrite(receiverA_led, LOW);
    }
}
#endif

// Private function: from http://arduino.cc/playground/Code/AvailableMemory
int freeRam () {
