Merge branch 'dev' into v2.1
@ -206,8 +206,9 @@ def tracker():
|
||||
collector.device_status_check()
|
||||
# Device info report to cloud
|
||||
controller.remote_device_report()
|
||||
# OTA plain check
|
||||
controller.remote_ota_check()
|
||||
if current_settings["user_cfg"]["sw_ota"] is True:
|
||||
# OTA plain check
|
||||
controller.remote_ota_check()
|
||||
# Low energy init
|
||||
controller.low_energy_init()
|
||||
# Low energy start
|
||||
|
@ -374,10 +374,10 @@ class Collector(Singleton):
|
||||
(light_status is True or light_status is None) and \
|
||||
(triaxial_status is True or triaxial_status is None) and \
|
||||
(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
|
||||
else:
|
||||
# self.__controller.running_led_show(2)
|
||||
# self.__controller.running_led_show(2000, 200)
|
||||
device_status = False
|
||||
|
||||
if device_status is False:
|
||||
@ -641,7 +641,7 @@ class Collector(Singleton):
|
||||
# OAT MQTT File Download Is Not Supported Yet.
|
||||
pass
|
||||
|
||||
def event_rrpc_request(self, *args, **kwargs):
|
||||
def rrpc_request(self, *args, **kwargs):
|
||||
"""Hanle RRPC request"""
|
||||
message_id = kwargs["message_id"]
|
||||
data = kwargs["data"]
|
||||
@ -774,6 +774,18 @@ class Collector(Singleton):
|
||||
elif low_energy_method == "POWERDOWN":
|
||||
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):
|
||||
"""Observer update option"""
|
||||
if isinstance(observable, LowEnergyManage):
|
||||
|
@ -151,14 +151,12 @@ class Controller(Singleton):
|
||||
raise TypeError("self.__low_energy is not registered.")
|
||||
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:
|
||||
raise TypeError("self.__running_led is not registered.")
|
||||
self.__running_led.set_period(period)
|
||||
return self.__running_led.led_timer_start()
|
||||
return self.__running_led.start_flicker(on_period, off_period)
|
||||
|
||||
def energy_led_show(self, period):
|
||||
def energy_led_show(self, on_period, off_period):
|
||||
if not self.energy_led_show:
|
||||
raise TypeError("self.energy_led_show is not registered.")
|
||||
self.__energy_led.set_period(period)
|
||||
return self.__energy_led.led_timer_start()
|
||||
return self.__energy_led.start_flicker(on_period, off_period)
|
||||
|
BIN
docs/media/aliyun_create_device.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
docs/media/aliyun_create_object_model.png
Normal file
After Width: | Height: | Size: 119 KiB |
BIN
docs/media/aliyun_create_product.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
docs/media/aliyun_export_lite_mode_object_model.png
Normal file
After Width: | Height: | Size: 129 KiB |
BIN
docs/media/aliyun_import_object_model.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
docs/media/aliyun_online_send_message.png
Normal file
After Width: | Height: | Size: 193 KiB |
BIN
docs/media/aliyun_ota_fota_module.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
docs/media/aliyun_ota_fota_plain.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
docs/media/aliyun_ota_fota_upgrade_package.png
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
docs/media/aliyun_ota_fota_upgrade_process.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
docs/media/aliyun_ota_sota_module.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
docs/media/aliyun_ota_sota_plain.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
docs/media/aliyun_ota_sota_upgrade_package.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
docs/media/aliyun_ota_sota_upgrade_process.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
docs/media/aliyun_tracker_running_saas_view.png
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
docs/media/qpycom_download.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
docs/media/quec_create_device.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
docs/media/quec_create_object_model.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
docs/media/quec_create_project.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
docs/media/quec_export_object_model.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
docs/media/quec_import_object_model.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
docs/media/quec_ota_fota_plain.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
docs/media/quec_ota_fota_upgrade_process.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
docs/media/quec_ota_fota_version_package.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
docs/media/quec_ota_model.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
docs/media/quec_ota_model_add_mcu_module.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
docs/media/quec_ota_sota_plain.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
docs/media/quec_ota_sota_upgrade_process.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
docs/media/quec_ota_sota_version_package.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
docs/media/tracker_code_import.png
Normal file
After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 528 KiB |
BIN
docs/media/tracker_running.png
Normal file
After Width: | Height: | Size: 118 KiB |