MS-PDRLKVHCADMG\Administrator hace 5 años
padre
commit
a102024908
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      api/application/controllers/Lampcontrol.php

+ 2 - 1
api/application/controllers/Lampcontrol.php

@@ -1150,7 +1150,8 @@ class Lampcontrol extends Base_Controller {
                 $data['tenth_light_time'] = base_convert(substr($res['msg'], 66,2), 16, 10).''; // 晨亮时间
                 $data['tenth_light_human_power'] = base_convert(substr($res['msg'], 68,2), 16, 10).''; // 晨亮有人功率
                 $data['tenth_light_unman_power'] = base_convert(substr($res['msg'], 70,2), 16, 10).''; // 晨亮无人功率
-                $data['induction_delay_status'] = base_convert(substr($res['msg'], 70,2), 16, 10).''; // 感应延时开关状态
+                $induction_delay_status = base_convert(substr($res['msg'], 70,2), 16, 10); // 感应延时开关状态
+                $data['induction_delay_status'] = $induction_delay_status > 0 ? '1' : '0';
                 $data['induction_delay'] = (base_convert(substr($res['msg'], 70,2), 16, 10) * 10).''; // 感应延时
                 // $data['tenth_light_human_power'] = base_convert(substr($res['msg'], 64,2), 16, 10).''; // 晨亮有人功率
                 // $data['tenth_light_unman_power'] = base_convert(substr($res['msg'], 68,2), 16, 10).''; // 晨亮无人功率