free serial pins if gps_disabled is set

This commit is contained in:
Thomas Göttgens
2022-03-24 18:22:31 +01:00
committed by GitHub
parent cef1614770
commit 72f443c519

View File

@@ -322,6 +322,7 @@ GPS *createGps()
#ifdef NO_GPS #ifdef NO_GPS
return nullptr; return nullptr;
#else #else
if (!radioConfig.preferences.gps_disabled){
#ifdef GPS_ALTITUDE_HAE #ifdef GPS_ALTITUDE_HAE
DEBUG_MSG("Using HAE altitude model\n"); DEBUG_MSG("Using HAE altitude model\n");
#else #else
@@ -353,6 +354,7 @@ GPS *createGps()
new_gps->setup(); new_gps->setup();
return new_gps; return new_gps;
} }
}
return nullptr; return nullptr;
#endif #endif
} }