MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / initMtkPa1616s

Function initMtkPa1616s

Tactility/Source/hal/gps/GpsInit.cpp:247–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247bool initMtkPa1616s(::Device* uart) {
248 // PA1616S is used in some GPS breakout boards from Adafruit
249 // PA1616S does not have GLONASS capability. PA1616D does, but is not implemented here.
250 uart_controller_write_bytes(uart, (const uint8_t*)"$PMTK353,1,0,0,0,0*2A\r\n", 23, 250);
251 // Above command will reset the GPS and takes longer before it will accept new commands
252 kernel::delayMillis(1000);
253 // Only ask for RMC and GGA (GNRMC and GNGGA)
254 uart_controller_write_bytes(uart, (const uint8_t*)"$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n", 51, 250);
255 kernel::delayMillis(250);
256 // Enable SBAS / WAAS
257 uart_controller_write_bytes(uart, (const uint8_t*)"$PMTK301,2*2E\r\n", 15, 250);
258 kernel::delayMillis(250);
259 return true;
260}
261
262bool initMtkL76b(::Device* uart) {
263 // Waveshare Pico-GPS hat uses the L76B with 9600 baud

Callers 1

initFunction · 0.85

Calls 2

delayMillisFunction · 0.85

Tested by

no test coverage detected