[SOLVED]How to execute "if" only when output is HIGH

guys, im having a bit of trouble sorting this out. i have a set of buttons some manual some that call eeprom value and set outputs to HIGH and quit them as soon as pressure is reached. now, im trying to add function, so if within 10second pressure is NOT reached, it will change state to LOW.
Now, i have 4 outputs:

output #1

if (FLSolUp == HIGH);
    if (millis() - onTime > elapsedTime) {
      if(pressureFL < EEPROM.read(20))
      {
        doNothingFL();
      }
    }

the other 3 are the same just different pins.
Problem is that those pins run low after 10seconds from reset instead from reading "HIGH" making my manual control unusable.

I cannot post the whole code as exeed max allowed 9000 char

mOskit

I have a question. should FLSolUp be a digitalRead? something like this if(digitalRead(FLSolUp) == HIGH)

Don`t make any difference.
i think that millis() must start when HIGH is seen.
I think that my sketch execute millis() from program startup.

if (FLSolUp == HIGH);

No semicolon!

A semicolon by itself is an empty statement - so you have programmed a NOP.

ok. that does work, but also makes my manual inputs unusable. I don`t know how to call this timer only with double click so manual control is not affected.
My loop

void loop()
{
 
//Single
 
  
//All UP
if (digitalRead(allUp) == LOW)
{
  digitalWrite (FLSolUp, HIGH);
  digitalWrite (FRSolUp, HIGH);
  digitalWrite (RLSolUp, HIGH);
  digitalWrite (RRSolUp, HIGH);
  
}
//All down
if (digitalRead(allDown) == LOW)
{
  digitalWrite (FLSolDown, HIGH);
  digitalWrite (FRSolDown, HIGH); 
  digitalWrite (RLSolDown, HIGH); 
  digitalWrite (RRSolDown, HIGH); 
}


int reading = digitalRead(autoAllUp); //single button you assign for double and hold press
              
   
   
   if(pressureFL >= EEPROM.read(20)) //Need 5 eeprom addresses and tag pressure from 1-5 rg. pressure1, pressure2.
   {
     doNothingFL();
   }
   if(pressureFR >= EEPROM.read(30))
   {
     doNothingFR();
   }
   if(pressureRL >= EEPROM.read(40))
   {
     doNothingRL();
   }
   if(pressureRR >= EEPROM.read(50))
   {
     doNothingRR();
   }
     
   if (digitalRead(FLSolUp == HIGH))    
   if (millis() - onTime > elapsedTime) {
     if(pressureFL < EEPROM.read(20))
     {
       doNothingFL();
     }
   }
       
   if (digitalRead(FRSolUp == HIGH))
   if (millis() - onTime > elapsedTime) {
     if(pressureFR < EEPROM.read(30))
     {
       doNothingFR();
     }
   }
   if (digitalRead(RLSolUp == HIGH))
   if (millis() - onTime > elapsedTime) {
     if(pressureRL < EEPROM.read(30))
     {
       doNothingRL();
     }
   }
   if (digitalRead(RRSolUp == HIGH))
   if (millis() - onTime > elapsedTime) {
     if(pressureRR < EEPROM.read(30))
     {
       doNothingRR();
     }
   }
   
   
   
   
      
   
   //First Pressed
   if(reading == LOW && lastReading == HIGH) {
     onTime = millis();
   }  
   //Held  
   if(reading == LOW && lastReading == LOW) {
     if((millis() - onTime) > holdTime) {
     hold = 1;
     blinkLED();
     }
   }
 //Released
 if (reading == HIGH && lastReading == LOW) {
   if (((millis() - onTime) > bounceTime) && hold != 1)  {
     doublePress();
   }
   if(hold == 1)  {
  Serial.println("HELD"); 
  storeMemoryFL();
  storeMemoryFR();
  storeMemoryRL();
  storeMemoryRR();
  hold = 0;
     }
 }

lastReading = reading;


if (single == 1 && (millis() - lastSwitchTime) > doubleSwitchTime)  {
 Serial.println ("SINGLE PRESS");
 single = 0;
  }

call functions

void doublePress() //CHECK HERE
  {
    
    if ((millis() - lastSwitchTime) >= doubleSwitchTime)  {
      single = 1;
      lastSwitchTime = millis();
      return;
    }
      if((millis() - lastSwitchTime) < doubleSwitchTime)  {
      int readMemFL = EEPROM.read(20);
      int readMemFR = EEPROM.read(30);
      int readMemRL = EEPROM.read(40);
      int readMemRR = EEPROM.read(50);
      
      Serial.println("DOUBLE PRESS");
      Serial.println(readMemFL);
      Serial.println(readMemFR);
      Serial.println(readMemRL);
      Serial.println(readMemRR);
      
      single = 0;
      lastSwitchTime = millis();
      
    
    if(pressureFL < readMemFL) 
   {
    upFL();  
   }
    if(pressureFL > readMemFL)
   {
    downFL();
   }
   if(pressureFR < readMemFR) 
   {
    upFR();  
   }
    if(pressureFR > readMemFR)
   {
     downFR();
   }
    if(pressureRL < readMemRL) 
   {
    upRL();  
   }
    if(pressureRL > readMemRL)
   {
     downRL();
   }    
   if(pressureRR < readMemRR) 
   {
    upRR();  
   }
    if(pressureRR > readMemRR)
   {
     downRR();
   }
  }
  }
  
   void storeMemoryFL()
  {
    EEPROM.write(20,pressureFL);
    Serial.println("DONE FL");
  }
   void storeMemoryFR()
  {
    EEPROM.write(30,pressureFR);
    Serial.println("DONE FR");
  }
   void storeMemoryRL()
  {
    EEPROM.write(40,pressureRL);
    Serial.println("DONE RL");
  }
   void storeMemoryRR()
  {
    EEPROM.write(50,pressureRR);
    Serial.println("DONE RR");
  }
  
  void blinkLED()  //Blink led, you must use display RGB in final prototype
  {    
    setColor(255, 0, 0);
    delay(200);
    setColor(0, 0, 0); 
    delay(200);
    setColor(255, 0, 0);
    delay(200);
    setColor(0, 0, 0); 
    delay(200);
    setColor(255, 0, 0);
    delay(200);
    setColor(0, 0, 0); 
    delay(200);
    setColor(255, 0, 0);
    delay(200);
    setColor(0, 0, 0); 
    delay(200);    
        
  }
  
  void upFL()
    {
     digitalWrite(FLSolUp, HIGH); //convert to solenoids in final prototype
    }
    
  void doNothingFL()
    {
      digitalWrite(FLSolUp, LOW); //convert to solenoids in final prototype      CHECK HERE
    }
  
  void downFL()
    {
      digitalWrite(FLSolDown, LOW); //convert to solenoids in final prototype     LOW here convert to high later for second button
    }
    void upFR()
    {
     digitalWrite(FRSolUp, HIGH); //convert to solenoids in final prototype
    }
    
  void doNothingFR()
    {
      digitalWrite(FRSolUp, LOW); //convert to solenoids in final prototype      
    }
  
  void downFR()
    {
      digitalWrite(FRSolDown, LOW); //convert to solenoids in final prototype     
    }
    void upRL()
    {
     digitalWrite(RLSolUp, HIGH); //convert to solenoids in final prototype
    }
    
  void doNothingRL()
    {
      digitalWrite(RLSolUp, LOW); //convert to solenoids in final prototype      
    }
  
  void downRL()
    {
      digitalWrite(RLSolDown, LOW); //convert to solenoids in final prototype     
    }
void upRR()
    {
     digitalWrite(RRSolUp, HIGH); //convert to solenoids in final prototype
    }
    
  void doNothingRR()
    {
      digitalWrite(RRSolUp, LOW); //convert to solenoids in final prototype      
    }
  
  void downRR()
    {
      digitalWrite(RRSolDown, LOW); //convert to solenoids in final prototype     
    }
if (millis() - onTime > elapsedTime) {

Where is onTime set?

...R

im not quite sure yet what ive done.
originlly what i`ve done was

if (digitalRead(FLSolUp) == HIGH) {onTime = millis()} {
    if (millis() - onTime > elapsedTime) {
      if(pressureFL < EEPROM.read(20))
      {
        doNothingFL();
      }
    }
    }

but nothing has happend .

and globlly is set "0"

if (digitalRead(FLSolUp) == HIGH)
 {
    onTime = millis()
  } 
  {
    if (millis() - onTime > elapsedTime) {
      if(pressureFL < EEPROM.read(20))
      {
        doNothingFL();
      }
    }
    }

Clearer now?

Yes AWOL. Sorry for that.

The treads will most likely be merge anyways.

What is the value of pressureFL before this IF statement?

byte target = EEPROM.read(20);
if (pressureFL == target) //THIS IS WHERE I`M HAVING PROBLEM
{
doNothingFL();
}

Say you store 100psi in eeprom. If its lower that 100psi your inflate button FLUp is low permamently but FLDown can be used.
If you go over 100Psi your FLDown becomes LOW permanently but FLUp can be used.
If pressure hits 100Psi or any other value that is stored in eeprom that both FLUp and FLDown are permamently LOW disabling any manual operation for example if you want to adjust pressure and store new value.

I understand that.
The reason I want to know what the pressure is, is because before this IF statement, the pressure is a random number (int pressureFL; ).

Ill test your code with dummy values when I get home in about an hour. Ill try to recreate what you are seeing.