From 5ce15027a9ba3fbe5380b561220b2dc2f6a3f08f Mon Sep 17 00:00:00 2001 From: p15692025051 <846603105@qq.com> Date: Tue, 30 May 2023 10:50:07 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=AD=A3=E6=A3=80=E6=B5=8Bgps=E5=85=B3?= =?utf8?q?=E9=97=AD=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../services/microPython/ports/quectel/core/mgr.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py index 0fbb7618..bd63bd18 100644 --- a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py +++ b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py @@ -644,11 +644,7 @@ class DeviceInfoManager(Abstract): self.hsensor.close() # #print("hsensor.open_heart:%d\r\n"%(self.hsensor.open_heart())) print("DeviceInfoManager:3") - ret = quecgnss.init() - if ret == 0: - print('GNSS init ok.') - else: - print('GNSS init failed.') + self.i2c0 = I2C(I2C.I2C0, I2C.FAST_MODE) self.stop_temp( None, None) @@ -1698,9 +1694,11 @@ class LocationManager(Abstract): EventMesh.subscribe(constants.EVENT.WIFIINFO, self.WIFI_INFO) EventMesh.subscribe(constants.EVENT.WIFISCANOPEN,self.WIFI_scan_open) EventMesh.subscribe(constants.EVENT.CLOSE_LOCATION,self.close_location) + EventMesh.subscribe("get_location_thread_flag",self.get_location_thread_flag) #EventMesh.subscribe(constants.EVENT.GPSCLOSE, self.gps_close) - + def get_location_thread_flag(self, event, msg): + return self.location_thread_flag def start_location(self, event, msg): #self.gps_open(event, msg) # print("start_location") @@ -1726,6 +1724,7 @@ class LocationManager(Abstract): self.location_thread_flag = 0 if(self.location_thread_id != 0): _thread.stop_thread(self.location_thread_id) + self.location_thread_id = 0 def WIFI_INFO(self, event, msg): self.wifi_data = msg -- 2.17.1