diff --git a/GB3TX/cw.ino b/GB3TX/cw.ino index ca0fefa..4764593 100644 --- a/GB3TX/cw.ino +++ b/GB3TX/cw.ino @@ -37,7 +37,6 @@ void sendChar(int speed, int pitch, char c) { } void sendID(repeater* myrpt) { - bool pip_att = false; if (myrpt->callsign == NULL) { return; } @@ -46,16 +45,13 @@ void sendID(repeater* myrpt) { /* attenuate pips in active T/T * unless first ID from sleep */ - if (myrpt->state != KEYCHUNK && busy(myrpt) && !pip_att) { - pip_att = true; + if (myrpt->state != KEYCHUNK && busy(myrpt) && !digitalRead(PIP_ATT)) digitalWrite(PIP_ATT, HIGH); - } sendChar(myrpt->params.cw_speed, myrpt->params.cw_pitch, myrpt->callsign[i]); delay(myrpt->params.cw_speed * 3); } - if (pip_att) { + if (digitalRead(PIP_ATT)) digitalWrite(PIP_ATT, LOW); - } }