mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
Fix for Pi Pico hang (#2817)
* Fix for Pi Pico hang * Pi Pico fix part 2: Electric Boogaloo
This commit is contained in:
parent
17207681ef
commit
7eff5e7bcb
@ -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]);
|
||||
@ -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
|
||||
|
||||
@ -850,7 +852,7 @@ GPS *GPS::createGps()
|
||||
if (!_tx_gpio)
|
||||
_tx_gpio = GPS_TX_PIN;
|
||||
#endif
|
||||
if (!_rx_gpio) // Configured to have no GPS at all
|
||||
if (!_rx_gpio || !_serial_gps) // Configured to have no GPS at all
|
||||
return nullptr;
|
||||
|
||||
GPS *new_gps = new GPS;
|
||||
|
Loading…
Reference in New Issue
Block a user