Edge detection help

Can someone help me out with something I can't seem to wrap my head around. I have two digital inputs and one digital output. Can someone help me with a bit of code that would do as follows.

Step 1 > Input 1 = low Step 2 > Output 1 goes High Step 3 > Input 2 = goes from low to high Step 4 > Output 1 goes Low

After input 1 goes low and makes the output go high the state of input 1 doesn't matter to me. The thing I cant wrap my head around is making the output go low only on the transition of input 2 from low to high.

See the state change detection example to see how to detect edges.

This is what I got so far. Maybe you can let me know if you see any flaws?

const int RadioCOSPin = 2;
const int WiresPTTPin = 3;
const int RadioPTTPin = 7;
const int AntennaRelayPin = 8;
int RadioCOSState = HIGH;
int LastWiresPTTState = HIGH;
int WiresPTTState = HIGH;
int Transmit = false;
int Disable = false;


void setup() 
{
  pinMode(RadioCOSPin, INPUT);
  pinMode(WiresPTTPin, INPUT);
  pinMode(RadioPTTPin, OUTPUT);
  pinMode(AntennaRelayPin, OUTPUT);

}

void loop() 
{
  {RadioCOSState = digitalRead(RadioCOSPin);
         if (RadioCOSState == LOW)
         {
         Disable = true;
         }
   }
   {WiresPTTState = digitalRead(WiresPTTPin);
         if (WiresPTTState != LastWiresPTTState)
          {
              if (WiresPTTState == HIGH)
             {
              Disable = false;
              }
           }
    }
  {
    if ((WiresPTTState = LOW) && (Disable = false);
       {
        digitalWrite(RadioPTTPin, LOW);
       }
       else
       {
        digitalWrite(RadioPTTPin, HIGH);
       }
  }
LastWiresPTTState = WiresPTTState
}

You have your braces kind of all over the place. When you see real coders write in C++ have you ever noticed how they always line the braces up and the blocks of code? They don’t do that just to make it pretty. It makes it a LOT easier to read. And when you want people to help you, making your code easier to read is always going to help a lot. Try using Control-T to autoformat the code.

Sorry I'm very new to coding. I winging it by reading examples. It's just the edge detection was hurting my brain because i don't have a firm understating of the language. Here is a second attempt at it...

const int RadioCOSPin = 2;
const int WiresPTTPin = 3;
const int RadioPTTPin = 7;
const int AntennaRelayPin = 8;
int RadioCOSState = HIGH;
int LastWiresPTTState = HIGH;
int WiresPTTState = HIGH;
int Transmit = false;
int Disable = false;


void setup()
{
  pinMode(RadioCOSPin, INPUT);
  pinMode(WiresPTTPin, INPUT);
  pinMode(RadioPTTPin, OUTPUT);
  pinMode(AntennaRelayPin, OUTPUT);

}

void loop()
{
  { RadioCOSState = digitalRead(RadioCOSPin);
    if (RadioCOSState == LOW)
    {
      Disable = true;
    }
  }
  { WiresPTTState = digitalRead(WiresPTTPin);
    if (WiresPTTState != LastWiresPTTState)
    {
      if (WiresPTTState == HIGH)
      {
        Disable = false;
      }
    }
  }
  {
    if ((WiresPTTState = LOW) && (Disable = false))
    {
      digitalWrite(RadioPTTPin, LOW);
    }
    else
    {
      digitalWrite(RadioPTTPin, HIGH);
    }
  }
  LastWiresPTTState = WiresPTTState;
}

I think you should probably go find a basic C++ tutorial you can go through so you can learn what those braces are supposed to be for and where they're supposed to go. You've got so many extras in there that it makes it almost impossible to follow through the logic and I'm not going to stress my eyes on it.

Here's a pair of bugs I see right off the bat.

if ((WiresPTTState = LOW) && (Disable = false))

Did you mean to assign values here or test values?

Test a value

Corymacs: Test a value

It was a rhetorical question. You need to go investigate the difference between = and ==.

Thanks for the help.