diff --git a/GB3TX/GB3TX.ino b/GB3TX/GB3TX.ino index caeccc5..1fbbcf4 100644 --- a/GB3TX/GB3TX.ino +++ b/GB3TX/GB3TX.ino @@ -66,7 +66,7 @@ void loop() { if (ht - tot < PIP_KEYCHUNK) continue; delay(350); - if (!digitalRead(COS)) { + if (busy(myrpt)) { continue; } courtesyTone(myrpt); diff --git a/GB3TX/repeater.ino b/GB3TX/repeater.ino index 929c86a..664412f 100644 --- a/GB3TX/repeater.ino +++ b/GB3TX/repeater.ino @@ -29,15 +29,20 @@ void rx(repeater* myrpt) { } } +bool busy(repeater* myrpt) { + rx(myrpt); + return (!myrpt->receiver.rx || !myrpt->gateway.receiver.rx); +} + void courtesyTone(repeater* myrpt) { switch(myrpt->params.courtesy) { case 0: myrpt->last == TT ? tone(3, myrpt->params.pip_pitch, myrpt->params.pip_length) : tone(3, myrpt->params.pip_gw_pitch, myrpt->params.pip_gw_length); + if (TAILPIPS) + delay(150); break; case 1: myrpt->last == TT ? sendChar(myrpt->params.pip_speed,myrpt->params.pip_pitch,myrpt->params.pip_letter) : sendChar(myrpt->params.pip_speed,myrpt->params.pip_gw_pitch, myrpt->params.pip_gw_letter); break; } - if (TAILPIPS) - delay(150); } \ No newline at end of file