diff --git a/README.md b/README.md index 8ea8b8d..a2b25ba 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,11 @@ Many thanks to David Brooke for coding this feature and the AFC. Change History ============== +09/05/2019 - V1.8.28 +-------------------- + + Store all payloads from combined packet for JSON transmission to client. + 09/05/2019 - V1.8.27 -------------------- diff --git a/gateway.c b/gateway.c index f47becb..8d33cc0 100644 --- a/gateway.c +++ b/gateway.c @@ -45,7 +45,7 @@ #include "udpclient.h" #include "lifo_buffer.h" -#define VERSION "V1.8.27" +#define VERSION "V1.8.28" bool run = TRUE; // RFM98 @@ -811,9 +811,8 @@ void RemoveOldPayloads(void) if ((time(NULL) - Config.Payloads[i].LastPacketAt) > 10800) { // More than 3 hours old, so remove it + Config.Payloads[i].InUse = 0; } - - Config.Payloads[i].InUse = 0; } } } @@ -857,7 +856,7 @@ int FindFreePayload(char *Payload) strcpy(Config.Payloads[Oldest].Payload, Payload); - return i; + return Oldest; } void DoPositionCalcs(int PayloadIndex) @@ -1039,6 +1038,8 @@ int ProcessTelemetryMessage(int Channel, received_t *Received) *endmessage = '\0'; LogTelemetryPacket(startmessage); + + ProcessLineUKHAS(Channel, startmessage); if ((Repeated = (*startmessage == '%'))) { @@ -1565,7 +1566,7 @@ void DIO0_Interrupt( int Channel ) strncpy(Received.UKHASstring, Received.Message, Received.Bytes); UDPSend(Received.UKHASstring, Config.UDPPort); Repeated = ProcessTelemetryMessage(Channel, &Received); - ProcessLineUKHAS(Channel, Config.LoRaDevices[Channel].Telemetry); + // ProcessLineUKHAS(Channel, Config.LoRaDevices[Channel].Telemetry); TestMessageForSMSAcknowledgement( Channel, Received.UKHASstring); CheckForChatContent(Channel, Repeated, Config.LoRaDevices[Channel].Telemetry); strcpy(Config.LoRaDevices[Channel].LocalDataBuffer, Received.UKHASstring); diff --git a/server.c b/server.c index 74ea7b1..fdb7913 100644 --- a/server.c +++ b/server.c @@ -196,9 +196,10 @@ int SendJSON(int connfd) // Send any packets that we've not sent yet for (PayloadIndex=0; PayloadIndex