mm_glib_source: Enable AGPS_MSB only if it's in modem capabilities
This commit is contained in:
parent
2bb1b70994
commit
a4a599a6c5
|
@ -64,9 +64,10 @@ class ModemManagerGLibNmeaSource(NmeaSource):
|
|||
if not caps & ModemManager.ModemLocationSource.GPS_NMEA:
|
||||
raise NmeaSourceNotFoundError(
|
||||
"Modem does not support NMEA")
|
||||
self.mlocation.setup_sync(
|
||||
(ModemManager.ModemLocationSource.GPS_NMEA
|
||||
| ModemManager.ModemLocationSource.AGPS_MSB), True, None)
|
||||
enable = ModemManager.ModemLocationSource.GPS_NMEA
|
||||
if caps & ModemManager.ModemLocationSource.AGPS_MSB:
|
||||
enable |= ModemManager.ModemLocationSource.AGPS_MSB
|
||||
self.mlocation.setup_sync(enable, True, None)
|
||||
else:
|
||||
raise ModemError("Modem state is: %d" % state)
|
||||
except AttributeError as e:
|
||||
|
|
Loading…
Reference in a new issue