From 70772219c79bf7b9aeace2b37a484732d91bb647 Mon Sep 17 00:00:00 2001 From: Jim Colderwood Date: Mon, 1 Apr 2024 22:21:45 +0100 Subject: [PATCH] Move ID check --- GB3TX/GB3TX.ino | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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