Skip to content

Commit

Permalink
Add support for ATGM332D series
Browse files Browse the repository at this point in the history
Adds detection code for the ATGM332D series of chips (11, 21, 31,
51, 71), and sets meshtastic to use GNSS_MODEL_ATGM336H for them.
  • Loading branch information
fifieldt committed Jul 30, 2024
1 parent 6813b8e commit bab3a9a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/gps/GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,14 +1217,23 @@ GnssModel_t GPS::probe(int serialSpeed)
return GNSS_MODEL_UC6580;
}

// Get version information
// Get version information for ATGM336H
clearBuffer();
_serial_gps->write("$PCAS06,1*1A\r\n");
if (getACK("$GPTXT,01,01,02,HW=ATGM336H", 500) == GNSS_RESPONSE_OK) {
LOG_INFO("ATGM336H GNSS init succeeded, using ATGM336H Module\n");
return GNSS_MODEL_ATGM336H;
}

/* ATGM332D series (-11(GPS), -21(BDS), -31(GPS+BDS), -51(GPS+GLONASS), -71-0(GPS+BDS+GLONASS))
based on AT6558 */
clearBuffer();
_serial_gps->write("$PCAS06,1*1A\r\n");
if (getACK("$GPTXT,01,01,02,HW=ATGM332D", 500) == GNSS_RESPONSE_OK) {
LOG_INFO("ATGM332D detected, using ATGM336H Module\n");
return GNSS_MODEL_ATGM336H;
}

// Get version information
clearBuffer();
_serial_gps->write("$PCAS06,0*1B\r\n");
Expand Down

0 comments on commit bab3a9a

Please sign in to comment.