Id routine update
This commit is contained in:
parent
6f441bd22e
commit
566cbfd52e
@ -121,19 +121,28 @@ void loop() {
|
||||
serial_writer(&myrpt->serial, "REPEATER: TIMEOUT RESET");
|
||||
}
|
||||
|
||||
tx(myrpt);
|
||||
if (myrpt->state > SLEEP && millis() - id >= (IDTIME - 60000)) {
|
||||
|
||||
/* Check if the repeater is in use
|
||||
* wait the full ID time
|
||||
*/
|
||||
|
||||
if (myrpt->state > IDLE && millis() - id < IDTIME) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (myrpt->state > SLEEP && millis() - id >= IDTIME) {
|
||||
serial_writer(&myrpt->serial, "REPEATER: ID");
|
||||
/* Repeater is IDLE, bring the transmitter up */
|
||||
if (!myrpt->transmitter.tx) {
|
||||
myrpt->state = HANG;
|
||||
tx(myrpt);
|
||||
myrpt->state = SLEEP;
|
||||
}
|
||||
serial_writer(&myrpt->serial, "REPEATER: ID");
|
||||
sendID(myrpt);
|
||||
id = millis();
|
||||
}
|
||||
|
||||
tx(myrpt);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user