Skip to content

v1.1.5 - resolve issue #22 #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun Swarm Satellite Arduino Library
version=1.1.4
version=1.1.5
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for the Swarm M138 satellite modem<br/><br/>
Expand Down
24 changes: 13 additions & 11 deletions src/SparkFun_Swarm_Satellite_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5697,17 +5697,19 @@ void SWARM_M138::pruneBacklog()

while (event != NULL) //If event is actionable, add it to pruneBuffer.
{
// These are the events we want to keep so they can be processed by poll / checkUnsolicitedMsg
if ((strstr(event, "$DT ") != NULL)
|| (strstr(event, "$GJ ") != NULL)
|| (strstr(event, "$GN ") != NULL)
|| (strstr(event, "$GS ") != NULL)
|| (strstr(event, "$PW ") != NULL)
|| (strstr(event, "$RD ") != NULL)
|| (strstr(event, "$RT ") != NULL)
|| (strstr(event, "$SL ") != NULL)
|| (strstr(event, "$M138 ") != NULL)
|| (strstr(event, "$TD ") != NULL))
// These are the events we want to keep so they can be processed by checkUnsolicitedMsg.
// See issue #22. We only keep events which have a callback, otherwise the backlog
// fills up causing other problems.
if (((strstr(event, "$DT ") != NULL) && (_swarmDateTimeCallback != NULL))
|| ((strstr(event, "$GJ ") != NULL) && (_swarmGpsJammingCallback != NULL))
|| ((strstr(event, "$GN ") != NULL) && (_swarmGeospatialCallback != NULL))
|| ((strstr(event, "$GS ") != NULL) && (_swarmGpsFixQualityCallback != NULL))
|| ((strstr(event, "$PW ") != NULL) && (_swarmPowerStatusCallback != NULL))
|| ((strstr(event, "$RD ") != NULL) && (_swarmReceiveMessageCallback != NULL))
|| ((strstr(event, "$RT ") != NULL) && (_swarmReceiveTestCallback != NULL))
|| ((strstr(event, "$SL ") != NULL) && (_swarmSleepWakeCallback != NULL))
|| ((strstr(event, "$M138 ") != NULL) && (_swarmModemStatusCallback != NULL))
|| ((strstr(event, "$TD ") != NULL) && (_swarmTransmitDataCallback != NULL)))
{
strcat(_pruneBuffer, event); // The URCs are all readable text so using strcat is OK
strcat(_pruneBuffer, "\n"); // strtok blows away delimiter, but we want that for later.
Expand Down
2 changes: 1 addition & 1 deletion src/SparkFun_Swarm_Satellite_Arduino_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#include <Wire.h> // Needed for I2C communication with Qwiic Swarm

/** Timeouts for the serial commands */
#define SWARM_M138_STANDARD_RESPONSE_TIMEOUT 1000 ///< Standard command timeout: allow one second for the modem to respond
#define SWARM_M138_STANDARD_RESPONSE_TIMEOUT 1500 ///< Standard command timeout: allow 1.5 seconds for the modem to respond (See issue #22. 1000ms was too short.)
#define SWARM_M138_MESSAGE_DELETE_TIMEOUT 5000 ///< Allow extra time when deleting a message
#define SWARM_M138_MESSAGE_ID_TIMEOUT 5000 ///< Allow extra time when reading the message IDs
#define SWARM_M138_MESSAGE_READ_TIMEOUT 3000 ///< Allow extra time when reading a message
Expand Down