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)
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")
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