Problems with input ports (logic)

Hello! I am trying to make the below code, but when both ports are in HIGH level AND blinking (about 2 times per second), I am facing a problem: it generates random values (charging or fail or charged).

if (LED1 == HIGH && LED2 == HIGH) 
                            {
                             delay(200);
                             Serial.print("BATTERY IS CHARGING");
                            } 
                                           
                  
                        if (LED1 == LOW && LED2 == HIGH)
                            {
                             delay(500);
                             Serial.print("BATTERY IS CHARGED ");
                            }
                            

                        if (LED1 == HIGH && LED2 == LOW)
                            {
                            Serial.print("BATTERY FAIL ");
                            }


                        if (LED1 == LOW && LED2 == LOW)
                            {
                             //DO NOTHING
                            }

The truth table can be seen below:

LED 1 RED	        LED 2 GREEN	      LOGIC	                       RESULT
HIGH	                HIGH	              LED ORANGE IS ON	               BATTERY IS CHARGING
HIGH	                LOW	              LED RED IS ON	               CHARGING FAIL
LOW	                HIGH	              LED GREEN IS ON	               CHARGED FINISHED
LOW	                LOW	              BOTH LEDS ARE OFF	               DO NOTHING
BLINKING		BLINKING              LED ORANGE BLINKING	       BATTERY IS HOT

How canI block the condition of both LED´s blinking?

Thank you.

How canI block the condition of both LED´s blinking?

Fix your code. Since you didn't post all of it, only you can fix it.

You need to post a complete program. And BEFORE doing so please use the AutoFormat tool to lay it out properly so it is easy to read.

My guess is that your delay()s are getting in the way. Have a look at how millis() is used to manage timing without blocking in Several things at a time.

...R