Arduino with relay and on-off rocker switch Help!

like this?

#define CLOSED                 LOW
#define OPENED                 HIGH

#define ENABLED                true
#define DISABLED               false

#define PUMPon                 LOW
#define PUMPoff                HIGH

// ------------------------------------------------------

boolean switch1Flag           = !ENABLED;
boolean switch2Flag           = !ENABLED;


const byte pump1Relay        = 2;
const byte pump2Relay        = 4;
const byte SWITCH1           = 7;
const byte heartbeatLED      = 13;

byte lastSwitch1State        = OPENED;
byte pump1State              = PUMPoff;
byte pump2State              = PUMPoff;

unsigned long pump1Millis;
unsigned long pump2Millis;

unsigned long heartbeatMillis;
unsigned long switchMillis;
unsigned long time_1;
unsigned long time_2;

unsigned long pump1_interval;
unsigned long pump2_interval;


// PUMP 1
const unsigned long pump1_OFF_time = 5000;
const unsigned long pump1_ON_time  = 2000;

// PUMP 2
const unsigned long pump2_OFF_time = 180000; //Pump 2 Change for delay (1000 = 1 second)
const unsigned long pump2_ON_time  = 5000; //Pump 2 Change for pump running time (1000 = 1 second)



//***************************************************************
void setup()
{
  Serial.begin(115200);

  pinMode(heartbeatLED, OUTPUT);
  pinMode(pump1Relay, OUTPUT);
  pinMode(pump2Relay, OUTPUT);

  pinMode(SWITCH1, INPUT_PULLUP);

  digitalWrite(pump1Relay, PUMPoff);
  digitalWrite(pump2Relay, PUMPoff);

  pump1_interval = pump1_OFF_time;

} //END of setup()

//***************************************************************
void loop()
{
  //*************************************                          h e a r t b e a t   T I M E R
  //to see if the sketch is blocking,
  //toggle the heartbeat LED every 500ms
  if (millis() - heartbeatMillis >= 500)
  {
    //restart the TIMER
    heartbeatMillis = millis();

    //toggle the LED
    digitalWrite(heartbeatLED, !digitalRead(heartbeatLED));
  }

  //*************************************                          c h e c k S w i t c h   T I M E R
  //is it time to read the switches ?
  if (millis() - switchMillis >= 50)
  {
    //restart the TIMER
    switchMillis = millis();

    checkSwitches();
  }

 //*************************************                PUMP 1
  //if the switch is 'not enabled' we can proceed with autmatic operation
  if (switch1Flag == !ENABLED)
  {
    //is it time to toggle the pump relay ?
    if (millis() - pump1Millis >= pump1_interval)
    {
      //restart the TIMER
      pump1Millis = millis();

      //is pump1 now OFF ?
      if (pump1State == PUMPoff)
      {
        digitalWrite(pump1Relay, PUMPon);

        pump1State = PUMPon;

        pump1_interval = pump1_ON_time;
      }

      else
      {
        digitalWrite(pump1Relay, PUMPoff);

        pump1State = PUMPoff;

        pump1_interval = pump1_OFF_time;
      }
    }
    
  } //END of if (switch1Flag == !ENABLED)


  //*************************************                PUMP 2
  //if the switch is 'not enabled' we can proceed with autmatic operation
  if (switch2Flag == !ENABLED)
  {
    //is it time to toggle the pump relay ?
    if (millis() - pump2Millis >= pump2_interval)
    {
      //restart the TIMER
      pump2Millis = millis();

      //is pump2 now OFF ?
      if (pump2State == PUMPoff)
      {
        digitalWrite(pump2Relay, PUMPon);

        pump2State = PUMPon;

        pump2_interval = pump2_ON_time;
      }

      else
      {
        digitalWrite(pump2Relay, PUMPoff);

        pump2State = PUMPoff;

        pump2_interval = pump2_OFF_time;
      }
    }
    
  } //END of if (switch2Flag == !ENABLED)




} //END of loop()

//********************************************************************************
void checkSwitches()
{
  //*********************************************                    S W I T C H 1
  //userSwitch code
  byte currentState = digitalRead(SWITCH1);

  //**********************
  //was there a change in state ?
  if (lastSwitch1State != currentState)
  {
    //update to the new state
    lastSwitch1State = currentState;

    //**********************                                         C L O S E D
    //is the switch closed ?
    if (currentState == CLOSED)
    {
      //
      digitalWrite(pump1Relay, PUMPon);

      //allow manual switch bypass
      switchFlag = ENABLED;
    }

    //**********************                                         O P E N E D
    //is the switch closed ?
    if (currentState == OPENED)
    {
      //toggle switch1
      digitalWrite(pump1Relay, PUMPoff);

      pump1State = PUMPoff;

      //cancel manual switch bypass
      switchFlag = DISABLED;
    }

  } //END of userSwitch code

  //*********************************************                    o t h e r S w i t c h e s
  //next switch code
  //*********************************************

} //END of   checkSwitches()