Also detect quirks when autodetecting source
This commit is contained in:
parent
da78c02a68
commit
a895bfc32f
|
@ -194,7 +194,7 @@ class SatelliteApp(Gtk.Application):
|
|||
source_init = self.init_gnss_share_source(autodetect=True)
|
||||
if not source_init:
|
||||
source_init = self.init_mm_source(
|
||||
quirks=['QuectelTalker'], autodetect=True)
|
||||
quirks=['detect'], autodetect=True)
|
||||
if not source_init:
|
||||
self.log_msg('NMEA source not found')
|
||||
dialog = Gtk.MessageDialog(
|
||||
|
|
|
@ -30,7 +30,7 @@ class ModemManagerGLibNmeaSource(NmeaSource):
|
|||
self.old_sources_enabled = None
|
||||
self.old_signals_location = None
|
||||
self.location_updated = None
|
||||
self.quirks = quirks
|
||||
self.quirks = set(quirks)
|
||||
|
||||
def initialize(self):
|
||||
# If reinitializing, disconnect old update cb
|
||||
|
@ -51,6 +51,12 @@ class ModemManagerGLibNmeaSource(NmeaSource):
|
|||
self.model = self.modem.get_model()
|
||||
self.revision = self.modem.get_revision()
|
||||
|
||||
if 'detect' in self.quirks:
|
||||
self.quirks.remove('detect')
|
||||
if (self.model.startswith('QUECTEL')
|
||||
and self.manufacturer == 'QUALCOMM INCORPORATED'):
|
||||
self.quirks.add('QuectelTalker')
|
||||
|
||||
try:
|
||||
state = self.modem.get_state()
|
||||
if int(state) > 0:
|
||||
|
|
Loading…
Reference in a new issue