DESKTOP-9JTA2JJ\HP před 5 roky
rodič
revize
903710cc9f
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      api/application/controllers/Lampcontrol.php

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

@@ -791,6 +791,7 @@ class Lampcontrol extends Base_Controller {
         $data['reduced_start_voltage']         = $this->input->post('reduced_start_voltage',true);  // 智能功率起始电压
         $data['reduced_stop_voltage']         = $this->input->post('reduced_stop_voltage',true);  // 智能功率结束电压
         $data['light_voltage']         = $this->input->post('light_voltage',true);  // 光控电压
+        $data['light_voltage']  *= 10;
         $data['light_delay_time']         = $this->input->post('light_delay_time',true);  // 光控延时时间
 
         $lampData = $this->Lamp_model->get_one($where,'projectid,address,number');
@@ -1188,7 +1189,7 @@ class Lampcontrol extends Base_Controller {
 
             $data['reduced_start_voltage']         = round(base_convert(substr($info, 78,4), 16, 10)/1000,1);  // 智能功率起始电压
             $data['reduced_stop_voltage']         = round(base_convert(substr($info, 82,4), 16, 10)/1000,1);  // 智能功率结束电压
-            $data['light_voltage']         = base_convert(substr($info, 86,2), 16, 10);  // 光控电压
+            $data['light_voltage']         = round(base_convert(substr($info, 86,2), 16, 10)/10);  // 光控电压
             $data['light_delay_time']         = base_convert(substr($info, 88,2), 16, 10);  // 光控延时时间
             
             exit(json_result('0000',$this->response['0000'],$data));