diff --git a/GB3TX/GB3TX.ino b/GB3TX/GB3TX.ino index ad356d6..43fbfa4 100644 --- a/GB3TX/GB3TX.ino +++ b/GB3TX/GB3TX.ino @@ -42,17 +42,6 @@ void loop() { while (1) { rx(myrpt); - if (myrpt->state > SLEEP && millis() - id >= IDTIME) { - /* Repeater is IDLE, bring the transmitter up */ - if (!myrpt->transmitter.tx) { - myrpt->state = HANG; - tx(myrpt); - myrpt->state = SLEEP; - } - sendID(myrpt); - id = millis(); - } - if (((!myrpt->receiver.rx || !myrpt->gateway.receiver.rx)) && myrpt->state < 2) { myrpt->state = KEYCHUNK; if (!myrpt->receiver.rx) @@ -124,6 +113,17 @@ void loop() { } tx(myrpt); + + if (myrpt->state > SLEEP && millis() - id >= IDTIME) { + /* Repeater is IDLE, bring the transmitter up */ + if (!myrpt->transmitter.tx) { + myrpt->state = HANG; + tx(myrpt); + myrpt->state = SLEEP; + } + sendID(myrpt); + id = millis(); + } } } \ No newline at end of file