wzh 5 лет назад
Родитель
Сommit
cfdf299481
1 измененных файлов с 0 добавлено и 27 удалено
  1. 0 27
      api/application/controllers/Lampcontrol.php

+ 0 - 27
api/application/controllers/Lampcontrol.php

@@ -2945,17 +2945,6 @@ class Lampcontrol extends Base_Controller {
                 if($protocoltype==6){
                     $this->add_device($data['address']);
                 }
-//                if($protocoltype==7){
-//                    $onenet=$this->add_device_onenet($data['address']);
-//                    if(is_object($onenet)){
-//                        $onenet=json_decode($onenet,true);
-//                    }
-//
-//                    $onenetId= $onenet['data']['device_id'];
-//                    if($onenetId){
-//                        $data['deviceid']=$onenetId;
-//                    }
-//                }
                 $networkData['protocoltype'] = empty($protocoltype) ? 0 : $protocoltype;
                 $networkData['projectid'] = $data['projectid'];
                 $networkData['devicesn'] = $number;
@@ -3084,14 +3073,6 @@ class Lampcontrol extends Base_Controller {
                         if ($old['protocoltype'] == 6) $this->remove_device($old['address']);
                         $this->add_device($data['address']);
                     }
-//                    if($protocoltype==7){
-//                        if ($old['protocoltype'] == 7) $this->remove_device_onenet($old['address']);
-//                        $onenet= $this->add_device_onenet($data['address']);
-//                        $onenetId= $onenet['data']['device_id'];
-//                        if($onenetId){
-//                            $data['deviceid']=$onenetId;
-//                        }
-//                    }
                 }else{
                     if ($protocoltype != $oldNet['protocoltype']) {
                         $number = mb_strlen($data['address']) == 13 ? base_convert($data['address'], 16, 10) : $data['address'];
@@ -3112,14 +3093,6 @@ class Lampcontrol extends Base_Controller {
                         }
                         if ($old['protocoltype'] == 6) $this->remove_device($old['address']);
                         if($protocoltype==6) $this->add_device($data['address']);
-//                        if($protocoltype==7){
-//                                 $this->remove_device_onenet($old['address']);
-//                                $onenet=$this->add_device_onenet($data['address']);
-//                                $onenetId= $onenet['data']['device_id'];
-//                                if($onenetId){
-//                                    $data['deviceid']=$onenetId;
-//                               }
-//                        }
 
                     }
                 }