Skip to content

Commit

Permalink
Fix for Pi Pico hang
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett committed Sep 20, 2023
1 parent 1720768 commit 8f9d335
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gps/GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ bool GPS::setup()
{
int msglen = 0;

if (_serial_gps && !didSerialInit) {
if (!didSerialInit) {
#if !defined(GPS_UC6580)
if (tx_gpio) {
LOG_DEBUG("Probing for GPS at %d \n", serialSpeeds[speedSelect]);
Expand Down Expand Up @@ -548,6 +548,8 @@ void GPS::publishUpdate()
int32_t GPS::runOnce()
{
if (!GPSInitFinished) {
if (!_serial_gps)
return disable();
if (!setup())
return 2000; // Setup failed, re-run in two seconds

Expand Down

0 comments on commit 8f9d335

Please sign in to comment.