From 9a44d00480888cb11c614034489cc048d798f40f Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Fri, 6 Jan 2023 10:06:45 +0000 Subject: [PATCH] 6.0.23.36 --- APRSCode.c | 20 ++++++++++++++++ Bpq32.c | 2 ++ Cmd.c | 1 - RigControl.c | 64 +++++++++++++++++++++++++++++++++------------------- UZ7HODrv.c | 9 -------- VARA.c | 11 ++++++++- Versions.h | 4 ++-- 7 files changed, 75 insertions(+), 36 deletions(-) diff --git a/APRSCode.c b/APRSCode.c index 8d70dd6..d3fe994 100644 --- a/APRSCode.c +++ b/APRSCode.c @@ -2038,6 +2038,12 @@ static int APRSProcessLine(char * buf) return TRUE; } + if (_stricmp(ptr, "SaveAPRSMsgs") == 0) + { + SaveAPRSMsgs = TRUE; + return TRUE; + } + p_value = strtok(NULL, " \t\n\r"); if (p_value == NULL) @@ -4640,6 +4646,20 @@ Dll struct STATIONRECORD * APIENTRY APPLFindStation(char * Call, BOOL AddIfNotF Dll struct APRSMESSAGE * APIENTRY APRSGetMessageBuffer() { struct APRSMESSAGE * ptr = MessageRecordPool; + + if (ptr == NULL) + { + // try getting oldest + + ptr = SMEM->Messages; + + if (ptr) + { + SMEM->Messages = ptr->Next; + memset(ptr, 0, sizeof(struct APRSMESSAGE)); + } + return ptr; + } if (ptr) { diff --git a/Bpq32.c b/Bpq32.c index ff2a8a6..26d4ef3 100644 --- a/Bpq32.c +++ b/Bpq32.c @@ -1131,6 +1131,8 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses // Changes to FreeDATA - Don't use deamon and add txlevel and send text commands (31) // Fix interactive commands in tracker driver (33) // Fix SESSIONTIMELIMIT processing +// Add STOPPORT/STARTPORT for UZ7HO driver +// Fix processing of extended QtSM 'g' frame (36) #define CKernel diff --git a/Cmd.c b/Cmd.c index 31dd130..19e3af4 100644 --- a/Cmd.c +++ b/Cmd.c @@ -3884,7 +3884,6 @@ VOID ATTACHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX return; } - Message.PORT = 0; ret = PORT->PORTTXCHECKCODE(PORT, Message.PORT); diff --git a/RigControl.c b/RigControl.c index 8e64497..aa38953 100644 --- a/RigControl.c +++ b/RigControl.c @@ -1558,22 +1558,23 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session, case YAESU: - if (n < 3) + if (n == 2) // Just set freq { - strcpy(Command, "Sorry - Invalid Format - should be Port Freq Mode\r"); - return FALSE; + ModeNo = -1; } - - for (ModeNo = 0; ModeNo < 15; ModeNo++) + else { - if (_stricmp(YaesuModes[ModeNo], Mode) == 0) - break; - } + for (ModeNo = 0; ModeNo < 15; ModeNo++) + { + if (_stricmp(YaesuModes[ModeNo], Mode) == 0) + break; + } - if (ModeNo == 15) - { - sprintf(Command, "Sorry -Invalid Mode\r"); - return FALSE; + if (ModeNo == 15) + { + sprintf(Command, "Sorry -Invalid Mode\r"); + return FALSE; + } } buffptr = GetBuff(); @@ -1597,11 +1598,17 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session, // Send Mode then Freq - setting Mode seems to change frequency - *(Poll++) = ModeNo; - *(Poll++) = 0; - *(Poll++) = 0; - *(Poll++) = 0; - *(Poll++) = 7; // Set Mode + FreqPtr->Cmd1Len = 0; + + if (ModeNo != -1) // Set freq only + { + *(Poll++) = ModeNo; + *(Poll++) = 0; + *(Poll++) = 0; + *(Poll++) = 0; + *(Poll++) = 7; // Set Mode + FreqPtr->Cmd1Len = 5; + } *(Poll++) = (FreqString[1] - 48) | ((FreqString[0] - 48) << 4); *(Poll++) = (FreqString[3] - 48) | ((FreqString[2] - 48) << 4); @@ -1609,7 +1616,7 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, int Session, *(Poll++) = (FreqString[7] - 48) | ((FreqString[6] - 48) << 4); *(Poll++) = 1; // Set Freq - FreqPtr->Cmd1Len = 10; + FreqPtr->Cmd1Len += 5; if (strcmp(PORT->Rigs[0].RigName, "FT847") == 0) { @@ -2863,7 +2870,19 @@ BOOL RigWriteCommBlock(struct RIGPORTINFO * PORT) fWriteStat = WriteFile(PORT->hDevice, PORT->TXBuffer, PORT->TXLen, &BytesWritten, NULL ); #endif if (PORT->TXLen != BytesWritten) - { + { + struct RIGINFO * RIG = &PORT->Rigs[PORT->CurrentRig]; // Only one on Yaseu + + if (RIG->RIGOK) + { + SetWindowText(RIG->hFREQ, "Port Closed"); + SetWindowText(RIG->hMODE, "----------"); + strcpy(RIG->WEB_FREQ, "-----------");; + strcpy(RIG->WEB_MODE, "------"); + } + + RIG->RIGOK = FALSE; + if (PORT->hDevice) CloseCOMPort(PORT->hDevice); @@ -7758,8 +7777,7 @@ VOID HAMLIBThread(struct RIGPORTINFO * PORT) err = WSAGetLastError(); - sprintf(Msg, "Connect Failed for HAMLIB socket - error code = %d Port %d\r\n", - err, htons(destaddr->sin_port)); + sprintf(Msg, "Connect Failed for HAMLIB socket - error code = %d Addr %s\r\n", err, PORT->IOBASE); WritetoConsole(Msg); PORT->Alerted = TRUE; @@ -7811,7 +7829,7 @@ VOID HAMLIBThread(struct RIGPORTINFO * PORT) if (FD_ISSET(PORT->remoteSock, &errorfs)) { Lost: - sprintf(Msg, "HAMLIB Connection lost for Port %s\r\n", PORT->IOBASE); + sprintf(Msg, "HAMLIB Connection lost for Addr %s\r\n", PORT->IOBASE); WritetoConsole(Msg); PORT->CONNECTED = FALSE; @@ -7830,7 +7848,7 @@ Lost: { } } - sprintf(Msg, "HAMLIB Thread Terminated Port %s\r\n", PORT->IOBASE); + sprintf(Msg, "HAMLIB Thread Terminated Addr %s\r\n", PORT->IOBASE); WritetoConsole(Msg); } diff --git a/UZ7HODrv.c b/UZ7HODrv.c index 37c530d..94088a5 100644 --- a/UZ7HODrv.c +++ b/UZ7HODrv.c @@ -2062,15 +2062,6 @@ VOID ProcessAGWPacket(struct TNCINFO * TNC, UCHAR * Message) RXHeader->DataLength = reverse(RXHeader->DataLength); #endif - if (RXHeader->DataKind == 'x') - return; - - if (RXHeader->DataKind == 'R') - return; - - if (RXHeader->DataKind == 'g') - return; - switch (RXHeader->DataKind) { case 'D': // Appl Data diff --git a/VARA.c b/VARA.c index edad83b..271fcdd 100644 --- a/VARA.c +++ b/VARA.c @@ -104,6 +104,8 @@ BOOL VARAStopPort(struct PORTCONTROL * PORT) if (TNC->Streams[0].Attached) TNC->Streams[0].ReportDISC = TRUE; + TNC->Streams[0].Disconnecting = FALSE; + if (TNC->TCPSock) { shutdown(TNC->TCPSock, SD_BOTH); @@ -328,6 +330,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) } } + TNC->Streams[0].Disconnecting = FALSE; switch (fn) { @@ -486,7 +489,6 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) sprintf(Msg, "%d SCANSTOP", TNC->Port); Rig_Command(-1, Msg); - } if (TNC->Streams[0].Attached) @@ -714,6 +716,8 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff) TNC->OverrideBusy = FALSE; VARASendCommand(TNC, Connect, TRUE); + TNC->Streams[0].ConnectTime = time(NULL); + memset(TNC->Streams[0].RemoteCall, 0, 10); strcpy(TNC->Streams[0].RemoteCall, &buff->L2DATA[2]); @@ -2251,6 +2255,9 @@ VOID VARAProcessReceivedData(struct TNCINFO * TNC) if (TNC->Streams[0].Attached) TNC->Streams[0].ReportDISC = TRUE; + TNC->Streams[0].Disconnecting = FALSE; + + closesocket(TNC->TCPDataSock); TNC->TCPSock = 0; @@ -2296,6 +2303,8 @@ VOID VARAProcessReceivedControl(struct TNCINFO * TNC) TNC->CONNECTED = FALSE; TNC->Streams[0].ReportDISC = TRUE; + TNC->Streams[0].Disconnecting = FALSE; + sprintf(TNC->WEB_COMMSSTATE, "Connection to TNC lost"); MySetWindowText(TNC->xIDC_COMMSSTATE, TNC->WEB_COMMSSTATE); diff --git a/Versions.h b/Versions.h index febfea0..187a879 100644 --- a/Versions.h +++ b/Versions.h @@ -10,8 +10,8 @@ #endif -#define KVers 6,0,23,34 -#define KVerstring "6.0.23.34\0" +#define KVers 6,0,23,36 +#define KVerstring "6.0.23.36\0" #ifdef CKernel