From 1c7245f94d8d0bb06dc7ea82abd846a012ff43c6 Mon Sep 17 00:00:00 2001 From: JackSun-qc Date: Wed, 6 Apr 2022 09:31:11 +0800 Subject: [PATCH] Delete: useless code --- code/aliyunIot.py | 3 +-- code/led.py | 12 ++++++------ code/location.py | 4 ---- code/quecthing.py | 1 - code/remote.py | 9 +-------- 5 files changed, 8 insertions(+), 21 deletions(-) diff --git a/code/aliyunIot.py b/code/aliyunIot.py index 000f823..3cb3293 100644 --- a/code/aliyunIot.py +++ b/code/aliyunIot.py @@ -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 diff --git a/code/led.py b/code/led.py index 5c10d95..cda8a25 100644 --- a/code/led.py +++ b/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 diff --git a/code/location.py b/code/location.py index 49cd5b6..2843ae2 100644 --- a/code/location.py +++ b/code/location.py @@ -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() diff --git a/code/quecthing.py b/code/quecthing.py index a5b7797..b82302d 100644 --- a/code/quecthing.py +++ b/code/quecthing.py @@ -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() diff --git a/code/remote.py b/code/remote.py index e00c0b3..0dc16d9 100644 --- a/code/remote.py +++ b/code/remote.py @@ -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))