correct enum

This commit is contained in:
Jim Colderwood 2024-04-05 15:11:27 +01:00
parent 632c208c0e
commit ca15816870
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ void loop() {
while (1) {
rx(myrpt);
if (((!myrpt->receiver.rx || !myrpt->gateway.receiver.rx)) && myrpt->state < 2) {
if (((!myrpt->receiver.rx || !myrpt->gateway.receiver.rx)) && myrpt->state < KEYCHUNK) {
myrpt->state = KEYCHUNK;
serial_writer(&myrpt->serial, "KEYCHUNK");
kc = millis();

View File

@ -1,5 +1,5 @@
void tx(repeater* myrpt) {
if (myrpt->state > 1 && !myrpt->transmitter.tx) {
if (myrpt->state > IDLE && !myrpt->transmitter.tx) {
serial_writer(&myrpt->serial, "REPEATER: TX ON");
myrpt->transmitter.tx = true;
digitalWrite(PTT,LOW);
@ -7,7 +7,7 @@ void tx(repeater* myrpt) {
return;
}
if (myrpt->state < 2 && myrpt->transmitter.tx) {
if (myrpt->state < KEYCHUNK && myrpt->transmitter.tx) {
serial_writer(&myrpt->serial, "REPEATER: TX OFF");
myrpt->transmitter.tx = false;
digitalWrite(PTT,HIGH);