Delete: useless code

This commit is contained in:
JackSun-qc 2022-04-06 09:31:11 +08:00
parent 9683b0a014
commit 1c7245f94d
5 changed files with 8 additions and 21 deletions

View File

@ -375,7 +375,6 @@ class AliYunIot(object):
elif topic.endswith('/thing/file/download_reply'): elif topic.endswith('/thing/file/download_reply'):
self.put_post_res(data['id'], True if int(data['code']) == 200 else False) self.put_post_res(data['id'], True if int(data['code']) == 200 else False)
if data['code'] == 200: if data['code'] == 200:
# self.downlink_queue.put(('ota_file_download', data['data'])) self.downlink_queue.put(('ota_file_download', data['data']))
pass
else: else:
pass pass

View File

@ -30,23 +30,23 @@ class LED(object):
# 3. flag is 0 LED OFF. # 3. flag is 0 LED OFF.
if flag is None: if flag is None:
if self.led_status == 1: if self.led_status == 1:
# TODO: LED SET OFF
self.led_status = 0 self.led_status = 0
# log.debug('LED SET OFF')
else: else:
# TODO: LED SET ON
self.led_status = 1 self.led_status = 1
# log.debug('LED SET ON')
elif flag == 0: elif flag == 0:
if self.led_status == 0: if self.led_status == 0:
# log.debug('LED ALREADY OFF') # TODO: LED ALREADY OFF
pass pass
else: else:
# TODO: LED SET OFF
self.led_status = 0 self.led_status = 0
# log.debug('LED SET OFF')
elif flag == 1: elif flag == 1:
if self.led_status == 1: if self.led_status == 1:
# log.debug('LED ALREADY ON') # TODO: LED ALREADY ON
pass pass
else: else:
# TODO: LED SET ON
self.led_status = 1 self.led_status = 1
# log.debug('LED SET ON')
pass pass

View File

@ -122,8 +122,6 @@ class GPS(Singleton):
timer_start_res = self.__gps_timer.start(50, 0, self.first_gps_timer_callback) timer_start_res = self.__gps_timer.start(50, 0, self.first_gps_timer_callback)
log.debug('timer_start_res: %s' % timer_start_res) log.debug('timer_start_res: %s' % timer_start_res)
nread = gps_data_retrieve_queue.get() nread = gps_data_retrieve_queue.get()
# nread = 0
# self.__first_break = 1
log.debug('__first_break nread: %s' % nread) log.debug('__first_break nread: %s' % nread)
data = self.uart_obj.read(nread).decode() data = self.uart_obj.read(nread).decode()
log.debug('__first_break data: %s' % data) log.debug('__first_break data: %s' % data)
@ -139,8 +137,6 @@ class GPS(Singleton):
log.debug('self.__second_break: %s' % self.__second_break) log.debug('self.__second_break: %s' % self.__second_break)
self.__gps_timer.start(1500, 0, self.second_gps_timer_callback) self.__gps_timer.start(1500, 0, self.second_gps_timer_callback)
nread = gps_data_retrieve_queue.get() nread = gps_data_retrieve_queue.get()
# nread = 0
# self.__second_break = 1
log.debug('__second_break nread: %s' % nread) log.debug('__second_break nread: %s' % nread)
if nread: if nread:
data += self.uart_obj.read(nread).decode() data += self.uart_obj.read(nread).decode()

View File

@ -169,7 +169,6 @@ class QuecThing(object):
return res return res
def quec_timer_cb(self, args): def quec_timer_cb(self, args):
# Power.powerRestart()
self.post_result_wait_queue.put(False) self.post_result_wait_queue.put(False)
self.quec_timer.stop() self.quec_timer.stop()

View File

@ -146,14 +146,6 @@ class DownLinkOption(object):
def query(self, *args, **kwargs): def query(self, *args, **kwargs):
self.tracker.device_data_report() 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): def ota_plain(self, *args, **kwargs):
current_settings = settings.settings.get() current_settings = settings.settings.get()
@ -166,6 +158,7 @@ class DownLinkOption(object):
self.tracker.remote.cloud_ota_action(val=1, kwargs=kwargs) self.tracker.remote.cloud_ota_action(val=1, kwargs=kwargs)
def ota_file_download(self, *args, **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)) log.debug('ota_file_download: %s' % str(args))