Skip to content

Commit b29099e

Browse files
jp-bennettfifieldt
authored andcommitted
Slightly more useful GPS debugging
1 parent 407c820 commit b29099e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gps/GPS.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,16 @@ GPS_RESPONSE GPS::getACK(const char *message, uint32_t waitMillis)
240240
buffer[bytesRead] = b;
241241
bytesRead++;
242242
if ((bytesRead == 767) || (b == '\r')) {
243+
#ifdef GPS_DEBUG
244+
LOG_DEBUG(debugmsg.c_str());
245+
#endif
243246
if (strnstr((char *)buffer, message, bytesRead) != nullptr) {
244247
#ifdef GPS_DEBUG
245248
LOG_DEBUG("Found: %s", message); // Log the found message
246249
#endif
247250
return GNSS_RESPONSE_OK;
248251
} else {
249252
bytesRead = 0;
250-
#ifdef GPS_DEBUG
251-
LOG_DEBUG(debugmsg.c_str());
252-
#endif
253253
}
254254
}
255255
}

0 commit comments

Comments
 (0)