mirror of
https://gitee.com/qpy-solutions/tracker-v2.git
synced 2025-05-19 02:58:25 +08:00
Delete: useless code
This commit is contained in:
parent
9683b0a014
commit
1c7245f94d
@ -375,7 +375,6 @@ class AliYunIot(object):
|
||||
elif topic.endswith('/thing/file/download_reply'):
|
||||
self.put_post_res(data['id'], True if int(data['code']) == 200 else False)
|
||||
if data['code'] == 200:
|
||||
# self.downlink_queue.put(('ota_file_download', data['data']))
|
||||
pass
|
||||
self.downlink_queue.put(('ota_file_download', data['data']))
|
||||
else:
|
||||
pass
|
||||
|
12
code/led.py
12
code/led.py
@ -30,23 +30,23 @@ class LED(object):
|
||||
# 3. flag is 0 LED OFF.
|
||||
if flag is None:
|
||||
if self.led_status == 1:
|
||||
# TODO: LED SET OFF
|
||||
self.led_status = 0
|
||||
# log.debug('LED SET OFF')
|
||||
else:
|
||||
# TODO: LED SET ON
|
||||
self.led_status = 1
|
||||
# log.debug('LED SET ON')
|
||||
elif flag == 0:
|
||||
if self.led_status == 0:
|
||||
# log.debug('LED ALREADY OFF')
|
||||
# TODO: LED ALREADY OFF
|
||||
pass
|
||||
else:
|
||||
# TODO: LED SET OFF
|
||||
self.led_status = 0
|
||||
# log.debug('LED SET OFF')
|
||||
elif flag == 1:
|
||||
if self.led_status == 1:
|
||||
# log.debug('LED ALREADY ON')
|
||||
# TODO: LED ALREADY ON
|
||||
pass
|
||||
else:
|
||||
# TODO: LED SET ON
|
||||
self.led_status = 1
|
||||
# log.debug('LED SET ON')
|
||||
pass
|
||||
|
@ -122,8 +122,6 @@ class GPS(Singleton):
|
||||
timer_start_res = self.__gps_timer.start(50, 0, self.first_gps_timer_callback)
|
||||
log.debug('timer_start_res: %s' % timer_start_res)
|
||||
nread = gps_data_retrieve_queue.get()
|
||||
# nread = 0
|
||||
# self.__first_break = 1
|
||||
log.debug('__first_break nread: %s' % nread)
|
||||
data = self.uart_obj.read(nread).decode()
|
||||
log.debug('__first_break data: %s' % data)
|
||||
@ -139,8 +137,6 @@ class GPS(Singleton):
|
||||
log.debug('self.__second_break: %s' % self.__second_break)
|
||||
self.__gps_timer.start(1500, 0, self.second_gps_timer_callback)
|
||||
nread = gps_data_retrieve_queue.get()
|
||||
# nread = 0
|
||||
# self.__second_break = 1
|
||||
log.debug('__second_break nread: %s' % nread)
|
||||
if nread:
|
||||
data += self.uart_obj.read(nread).decode()
|
||||
|
@ -169,7 +169,6 @@ class QuecThing(object):
|
||||
return res
|
||||
|
||||
def quec_timer_cb(self, args):
|
||||
# Power.powerRestart()
|
||||
self.post_result_wait_queue.put(False)
|
||||
self.quec_timer.stop()
|
||||
|
||||
|
@ -146,14 +146,6 @@ class DownLinkOption(object):
|
||||
|
||||
def query(self, *args, **kwargs):
|
||||
self.tracker.device_data_report()
|
||||
# for arg in args:
|
||||
# if hasattr(settings.default_values_app, arg):
|
||||
# current_settings = settings.settings.get()
|
||||
# self.tracker.remote.post_data({arg: current_settings.get('app', {}).get(arg)})
|
||||
# elif hasattr(self.controller, arg):
|
||||
# getattr(self.controller, arg)(*('r'))
|
||||
# else:
|
||||
# pass
|
||||
|
||||
def ota_plain(self, *args, **kwargs):
|
||||
current_settings = settings.settings.get()
|
||||
@ -166,6 +158,7 @@ class DownLinkOption(object):
|
||||
self.tracker.remote.cloud_ota_action(val=1, kwargs=kwargs)
|
||||
|
||||
def ota_file_download(self, *args, **kwargs):
|
||||
# TODO: To Download OTA File For MQTT Association (Not Support Now.)
|
||||
log.debug('ota_file_download: %s' % str(args))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user