But when i turn of the transmitter the interrupt is called but nothing happens apart from a flashing LED
while ((digitalRead(RxThro) == LOW)||(failSafe == true))
{
}
while ((digitalRead(RxThro) == HIGH)||(failSafe == true))
{
}
You are going to get stuck in one or the other of the while loops. What is the state of the RxThro pin when the transmitter is turned off? I can change which while loop the code sticks in by changing pin 3 from INPUT to INPUT_PULLUP and not having any signal on that pin.
Your while loop can not be based on digitalRead(RxThro) but rather on waiting to see some change in RxThro.
Start the time when RxThro goes from HIGH to LOW or when failSafe is true. End the time when RxThro goes from LOW to HIGH or when failSafe is true.
You are not getting stuck in the interrupt. You are getting stuck in one or the other of the while loops because RxThro is not changing.
The interrupt is triggering independently of the while loop, and that's why you see the led flash.