Browse Source

no message

MS-PDRLKVHCADMG\Administrator 5 years ago
parent
commit
cc57d12fa2
1 changed files with 6 additions and 5 deletions
  1. 6 5
      api/application/controllers/Lampcontrol.php

+ 6 - 5
api/application/controllers/Lampcontrol.php

@@ -775,9 +775,10 @@ class Lampcontrol extends Base_Controller {
         $data['system_voltage']                 = $this->input->post('system_voltage',true);  // 电池电压
         $data['battery_count']                 = $this->input->post('battery_count',true);  // 电池串数
         $data['battery_type']              = $this->input->post('battery_type',true);  //蓄电池类型
-        if ($data['battery_type'] == 1 || $data['battery_type'] == 2) {
-            $data['battery_count'] = 1;
-        }
+        // if ($data['battery_type'] == 1 || $data['battery_type'] == 2) {
+            
+        // }
+        $data['battery_count'] = 1;
         $data['overvoltage']                  = $this->input->post('overvoltage',true);  // 超压电压
         $data['char_limit_voltage']            = $this->input->post('char_limit_voltage',true);  // 充电限制电压
         $data['equ_char_voltage']               = $this->input->post('equ_char_voltage',true); // 均衡充电电压
@@ -1029,9 +1030,9 @@ class Lampcontrol extends Base_Controller {
 
     private function format_date_en($date){
         $h = floor($date/60);
-        $h = $h > 10 ? $h : '0'.$h;
+        $h = $h >= 10 ? $h : '0'.$h;
         $t = floor($date%60);
-        $t = $t > 10 ? $t : '0'.$t;
+        $t = $t >= 10 ? $t : '0'.$t;
         return $h.':'.$t;
     }