tail pip timer
This commit is contained in:
parent
a1e2d5307f
commit
90a826c8b2
@ -74,16 +74,16 @@ void loop() {
|
||||
myrpt->last = myrpt->state;
|
||||
myrpt->state = HANG;
|
||||
ht = millis();
|
||||
myrpt->tail = ht;
|
||||
if (ht - tot < PIP_KEYCHUNK || busy(myrpt))
|
||||
continue;
|
||||
courtesyTone(myrpt);
|
||||
}
|
||||
|
||||
if (myrpt->state == HANG && TAILPIPS) {
|
||||
static unsigned long bc = millis();
|
||||
if (millis() - bc >= 1000 && !busy(myrpt)) {
|
||||
bc = millis();
|
||||
tone(3, TAILPIP_PITCH, myrpt->params.pip_length);
|
||||
if (millis() - myrpt->tail >= TAIL_PIP_DELAY && !busy(myrpt)) {
|
||||
myrpt->tail = millis();
|
||||
tone(PIP, TAILPIP_PITCH, myrpt->params.pip_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,7 @@ typedef struct {
|
||||
serial serial;
|
||||
state state;
|
||||
transmitter transmitter;
|
||||
unsigned long tail;
|
||||
}repeater;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user