Remove boolean, read pin!
This commit is contained in:
parent
aab8ebd76c
commit
dead17ab27
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user