mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
Make sure for revolution all the GPS objects are always initialized even if
there is no GPS port. Otherwise connecting to relevant queues will fail.
This commit is contained in:
parent
b7c3b1fdd1
commit
deb3336729
@ -138,6 +138,17 @@ int32_t GPSInitialize(void)
|
||||
gpsEnabled = false;
|
||||
#endif
|
||||
|
||||
#if defined(REVOLUTION)
|
||||
// Revolution expects these objects to always be defined. Not doing so will fail some
|
||||
// queue connections in navigation
|
||||
GPSPositionInitialize();
|
||||
GPSVelocityInitialize();
|
||||
GPSTimeInitialize();
|
||||
GPSSatellitesInitialize();
|
||||
HomeLocationInitialize();
|
||||
updateSettings();
|
||||
|
||||
#else
|
||||
if (gpsPort && gpsEnabled) {
|
||||
GPSPositionInitialize();
|
||||
GPSVelocityInitialize();
|
||||
@ -149,7 +160,10 @@ int32_t GPSInitialize(void)
|
||||
HomeLocationInitialize();
|
||||
#endif
|
||||
updateSettings();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gpsPort && gpsEnabled) {
|
||||
gps_rx_buffer = pvPortMalloc(NMEA_MAX_PACKET_LENGTH);
|
||||
PIOS_Assert(gps_rx_buffer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user