From dfdfe7e4431481cc1f06be28b4c8c3db2781b30a Mon Sep 17 00:00:00 2001 From: JimZAH Date: Mon, 16 Sep 2024 20:50:25 +0100 Subject: [PATCH] testing --- GB3TX/GB3TX.ino | 10 +++++----- GB3TX/config.h | 24 ++++++++++++------------ GB3TX/cw.ino | 5 ++--- GB3TX/repeater.ino | 4 ++-- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/GB3TX/GB3TX.ino b/GB3TX/GB3TX.ino index ccff043..da77a7f 100644 --- a/GB3TX/GB3TX.ino +++ b/GB3TX/GB3TX.ino @@ -12,7 +12,7 @@ void setup() { void loop() { repeater rpt; - repeater* myrpt; + repeater *myrpt; myrpt = &rpt; myrpt->callsign = ID; myrpt->params.cw_pitch = CW_PITCH; @@ -58,6 +58,8 @@ void loop() { } if (myrpt->state == KEYCHUNK && millis() - kc > KEYCHUNK_TIME) { + if (myrpt->params.start_up) + sendID(myrpt); if (!myrpt->receiver.rx) { myrpt->state = TT; serial_writer(&myrpt->serial, "RX: RF"); @@ -67,8 +69,6 @@ void loop() { myrpt->timer.gw_start = millis(); } tot = millis(); - if (myrpt->params.start_up) - sendID(myrpt); } if ((myrpt->receiver.rx && myrpt->gateway.receiver.rx) && myrpt->state == KEYCHUNK) { @@ -138,7 +138,7 @@ void loop() { serial_writer(&myrpt->serial, "REPEATER: TIMEOUT RESET"); } - if (myrpt->state > SLEEP && millis() - myrpt->id_time >= (IDTIME - 60000)) { + if (millis() - myrpt->id_time >= (IDTIME - 60000)) { /* Check if the repeater is in use * wait the full ID time @@ -162,4 +162,4 @@ void loop() { tx(myrpt); } -} \ No newline at end of file +} diff --git a/GB3TX/config.h b/GB3TX/config.h index 52650ec..f8c37b7 100644 --- a/GB3TX/config.h +++ b/GB3TX/config.h @@ -10,32 +10,32 @@ #define PIP 3 /* CW ID SETTINGS */ -#define ID "MX0WVV" -#define CW_SPEED 25 -#define CW_PITCH 950 +#define ID "G5BSD" +#define CW_SPEED 18 +#define CW_PITCH 625 /* PARAMS */ #define COURTESY CW #define CLOSEDOWN 1 #define GWPIPLEN 1200 / CW_SPEED -#define PIP_LETTER 'W' -#define PIP_GW_LETTER 'X' -#define RFPIP 950 +#define PIP_LETTER 'E' +#define PIP_GW_LETTER 'T' +#define RFPIP 1255 #define RFPIPLEN 1200 / CW_SPEED #define START 0 #define TAILPIPS true -#define TAILPIP_PITCH 950 +#define TAILPIP_PITCH 625 /* SERIAL */ #define SERIAL true #define SERIAL_SPEED 115200 /* TIMERS */ -#define HANGTIME 5000 -#define KEYCHUNK_TIME 2500 +#define HANGTIME 6000 +#define KEYCHUNK_TIME 1000 #define TIMEOUT 300000 #define IDTIME 300000 -#define PIP_KEYCHUNK 2000 -#define TAIL_PIP_DELAY 1000 +#define PIP_KEYCHUNK 1 +#define TAIL_PIP_DELAY 3500 -#endif \ No newline at end of file +#endif diff --git a/GB3TX/cw.ino b/GB3TX/cw.ino index 4be4ea3..71ab638 100644 --- a/GB3TX/cw.ino +++ b/GB3TX/cw.ino @@ -20,7 +20,7 @@ void sendChar(repeater* myrpt, char c) { int dd = morse[index]; - if (digitalRead(PIP_ATT) && myrpt->state != SLEEP) + if (digitalRead(PIP_ATT) && myrpt->state > KEYCHUNK) digitalWrite(PIP_ATT, LOW); for (int i=0; i < 8; i++) { if (dd == 1) { @@ -51,7 +51,7 @@ void sendID(repeater* myrpt) { delay(500); - if (myrpt->state == SLEEP) + if (myrpt->state < HANG) digitalWrite(PIP_ATT, HIGH); for (int i=0; i < sizeof ID/sizeof ID[0]; i++) { @@ -61,4 +61,3 @@ void sendID(repeater* myrpt) { if (digitalRead(PIP_ATT)) digitalWrite(PIP_ATT, LOW); } - diff --git a/GB3TX/repeater.ino b/GB3TX/repeater.ino index d859866..ea1dc71 100644 --- a/GB3TX/repeater.ino +++ b/GB3TX/repeater.ino @@ -18,7 +18,7 @@ void tx(repeater* myrpt) { void rx(repeater* myrpt) { myrpt->receiver.rx = digitalRead(COS); - myrpt->gateway.receiver.rx = digitalRead(GW_COS); + myrpt->gateway.receiver.rx = 1; //digitalRead(GW_COS); if (!myrpt->receiver.rx && !myrpt->gateway.transmitter.tx) { serial_writer(&myrpt->serial, "REPEATER: COS"); @@ -113,4 +113,4 @@ void serial_writer(serial* s, char* buff) { return; Serial.write(buff); Serial.write('\n'); -} \ No newline at end of file +}