use defined pip pin

This commit is contained in:
Jim Colderwood 2024-04-06 22:42:50 +01:00
parent 14061b4122
commit a1e2d5307f
3 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ void loop() {
if (millis() - tot >= TIMEOUT && (myrpt->state == TT || myrpt->state == GW)) { if (millis() - tot >= TIMEOUT && (myrpt->state == TT || myrpt->state == GW)) {
serial_writer(&myrpt->serial, "REPEATER: TIMEOUT"); serial_writer(&myrpt->serial, "REPEATER: TIMEOUT");
myrpt->state = TIMEOUT; myrpt->state = TIMEOUT;
tone(3, 440, 1000); tone(PIP, 440, 1000);
delay(1000); delay(1000);
} }

View File

@ -24,14 +24,14 @@ void sendChar(int speed, int pitch, char c) {
if (dd == 1) { if (dd == 1) {
return; return;
} }
tone(3, pitch); tone(PIP, pitch);
if (dd&1) { if (dd&1) {
delay(speed * 3); delay(speed * 3);
} else { } else {
delay(speed); delay(speed);
} }
dd >>= 1; dd >>= 1;
noTone(3); noTone(PIP);
delay(speed); delay(speed);
} }
} }

View File

@ -39,7 +39,7 @@ bool busy(repeater* myrpt) {
void courtesyTone(repeater* myrpt) { void courtesyTone(repeater* myrpt) {
switch(myrpt->params.courtesy) { switch(myrpt->params.courtesy) {
case TONE: case TONE:
myrpt->last == TT ? tone(3, myrpt->params.pip_pitch, myrpt->params.pip_length) : tone(3, myrpt->params.pip_gw_pitch, myrpt->params.pip_gw_length); myrpt->last == TT ? tone(PIP, myrpt->params.pip_pitch, myrpt->params.pip_length) : tone(PIP, myrpt->params.pip_gw_pitch, myrpt->params.pip_gw_length);
break; break;
case CW: case CW:
myrpt->last == TT ? sendChar(myrpt->params.pip_speed,myrpt->params.pip_pitch,myrpt->params.pip_letter) : sendChar(myrpt->params.pip_speed,myrpt->params.pip_gw_pitch, myrpt->params.pip_gw_letter); myrpt->last == TT ? sendChar(myrpt->params.pip_speed,myrpt->params.pip_pitch,myrpt->params.pip_letter) : sendChar(myrpt->params.pip_speed,myrpt->params.pip_gw_pitch, myrpt->params.pip_gw_letter);