Merge branch 'dev' into v2.1

This commit is contained in:
JackSun 2022-05-20 15:49:09 +08:00
commit 2a1415cf17
37 changed files with 2447 additions and 1758 deletions

View File

@ -206,6 +206,7 @@ def tracker():
collector.device_status_check() collector.device_status_check()
# Device info report to cloud # Device info report to cloud
controller.remote_device_report() controller.remote_device_report()
if current_settings["user_cfg"]["sw_ota"] is True:
# OTA plain check # OTA plain check
controller.remote_ota_check() controller.remote_ota_check()
# Low energy init # Low energy init

View File

@ -374,10 +374,10 @@ class Collector(Singleton):
(light_status is True or light_status is None) and \ (light_status is True or light_status is None) and \
(triaxial_status is True or triaxial_status is None) and \ (triaxial_status is True or triaxial_status is None) and \
(mike_status is True or mike_status is None): (mike_status is True or mike_status is None):
# self.__controller.running_led_show(0.5) # self.__controller.running_led_show(200, 200)
device_status = True device_status = True
else: else:
# self.__controller.running_led_show(2) # self.__controller.running_led_show(2000, 200)
device_status = False device_status = False
if device_status is False: if device_status is False:
@ -641,7 +641,7 @@ class Collector(Singleton):
# OAT MQTT File Download Is Not Supported Yet. # OAT MQTT File Download Is Not Supported Yet.
pass pass
def event_rrpc_request(self, *args, **kwargs): def rrpc_request(self, *args, **kwargs):
"""Hanle RRPC request""" """Hanle RRPC request"""
message_id = kwargs["message_id"] message_id = kwargs["message_id"]
data = kwargs["data"] data = kwargs["data"]
@ -774,6 +774,18 @@ class Collector(Singleton):
elif low_energy_method == "POWERDOWN": elif low_energy_method == "POWERDOWN":
self.__controller.power_down() self.__controller.power_down()
def thing_services(self, data):
log.debug("thing_services data: %s" % str(data))
service_data = {
data["service"]: {
"id": data["data"]["id"],
"code": 200,
"message": "Success",
"data": {}
}
}
self.__controller.remote_post_data(service_data)
def update(self, observable, *args, **kwargs): def update(self, observable, *args, **kwargs):
"""Observer update option""" """Observer update option"""
if isinstance(observable, LowEnergyManage): if isinstance(observable, LowEnergyManage):

View File

@ -151,14 +151,12 @@ class Controller(Singleton):
raise TypeError("self.__low_energy is not registered.") raise TypeError("self.__low_energy is not registered.")
return self.__low_energy.stop() return self.__low_energy.stop()
def running_led_show(self, period): def running_led_show(self, on_period, off_period):
if not self.__running_led: if not self.__running_led:
raise TypeError("self.__running_led is not registered.") raise TypeError("self.__running_led is not registered.")
self.__running_led.set_period(period) return self.__running_led.start_flicker(on_period, off_period)
return self.__running_led.led_timer_start()
def energy_led_show(self, period): def energy_led_show(self, on_period, off_period):
if not self.energy_led_show: if not self.energy_led_show:
raise TypeError("self.energy_led_show is not registered.") raise TypeError("self.energy_led_show is not registered.")
self.__energy_led.set_period(period) return self.__energy_led.start_flicker(on_period, off_period)
return self.__energy_led.led_timer_start()

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff