Skip to content

Commit f6e9868

Browse files
committed
Attempt to disable output multiple times
1 parent 7fb11ef commit f6e9868

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/SparkFun_Unicore_GNSS_Arduino_Library.cpp

+11-2
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,18 @@ bool UM980::setRTCMMessage(const char *sentenceType, float outputRate)
803803
// Warning, each message has to be individually re-enabled
804804
bool UM980::disableOutput()
805805
{
806-
stopAutoReports(); // Remove pointers so we will re-init next check
806+
for (int x = 0; x < 5; x++)
807+
{
808+
if (sendCommand("UNLOG") == true)
809+
{
810+
stopAutoReports(); // Remove pointers so we will re-init next check
811+
return (true);
812+
}
813+
814+
delay(10 * x);
815+
}
807816

808-
return (sendCommand("UNLOG"));
817+
return (false);
809818
}
810819

811820
// Disable all messages on a given port

0 commit comments

Comments
 (0)