Skip to content

Commit

Permalink
SoftRF Release 1.6 firmware binaries for CC1352R, S76G and ESP8266 [s…
Browse files Browse the repository at this point in the history
…kip ci]
  • Loading branch information
lyusupov committed Nov 19, 2024
1 parent 0c814b0 commit a923d66
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
23 changes: 16 additions & 7 deletions software/firmware/source/SoftRF/src/driver/GNSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ bool nmea_handshake(const char *req, const char *resp, bool skipline)

/* skip first line when expected response contains 2 of them */
if (skipline) {
// start_time = millis();
start_time = millis();
while (Serial_GNSS_In.read() != '\n' && (millis() - start_time) < timeout_ms) { yield(); }
}

Expand Down Expand Up @@ -1154,7 +1154,7 @@ const gnss_chip_ops_t uc65_ops = {
static gnss_id_t ag33_probe()
{
/* Firmware version request */
return nmea_handshake("$PAIR021*39\r\n", "$PAIR021,", true) ?
return nmea_handshake("$PAIR021*39\r\n", "$PAIR001,021", false) ?
GNSS_MODULE_AG33 : GNSS_MODULE_NMEA;
}

Expand All @@ -1163,21 +1163,30 @@ extern gnss_chip_ops_t ag33_ops;
static bool ag33_setup()
{
#if !defined(EXCLUDE_LOG_GNSS_VERSION)
int i=0;
char c;
unsigned long timeout_ms = 2000 ;

while (Serial_GNSS_In.available() > 0) { Serial_GNSS_In.read(); }

unsigned long start_time = millis();

while ((millis() - start_time) < timeout_ms) {
c = Serial_GNSS_In.read();
if (c == '\n') break;
}

Serial_GNSS_Out.write("$PAIR021*39\r\n");

int i=0;
char c;
unsigned long start_time = millis();
start_time = millis();

while ((millis() - start_time) < 2000) {
while ((millis() - start_time) < timeout_ms) {
c = Serial_GNSS_In.read();
if (c == '\n') break;
}

/* take response into buffer */
while ((millis() - start_time) < 2000) {
while ((millis() - start_time) < timeout_ms) {

c = Serial_GNSS_In.read();

Expand Down

0 comments on commit a923d66

Please sign in to comment.