|
@@ -417,7 +417,6 @@ class Lampcontrol extends Base_Controller {
|
|
$token = $this->input->post('token',true);
|
|
$token = $this->input->post('token',true);
|
|
$type = intval($this->input->post('type',true));
|
|
$type = intval($this->input->post('type',true));
|
|
$lamp_id = $this->input->post('lamp_id',true);
|
|
$lamp_id = $this->input->post('lamp_id',true);
|
|
- $version = $this->session->userdata('version');
|
|
|
|
|
|
|
|
|
|
|
|
$lamp_id = $this->input->post('lamp_id', true);
|
|
$lamp_id = $this->input->post('lamp_id', true);
|
|
@@ -425,11 +424,11 @@ class Lampcontrol extends Base_Controller {
|
|
exit(json_result('0411', $this->response['0411'], array()));
|
|
exit(json_result('0411', $this->response['0411'], array()));
|
|
}
|
|
}
|
|
$ids = explode(',', $lamp_id);
|
|
$ids = explode(',', $lamp_id);
|
|
- $status = 1;
|
|
|
|
$list = $this->Lamp_model->get_list(['id'=>$ids],'address');
|
|
$list = $this->Lamp_model->get_list(['id'=>$ids],'address');
|
|
|
|
+ $cmd = empty($type) ? '01' : '02';
|
|
foreach ($list as $v) {
|
|
foreach ($list as $v) {
|
|
|
|
|
|
- $this->send_cmd('18',$v['address'],'','0000000000','0100',0);
|
|
|
|
|
|
+ $this->send_cmd('18',$v['address'],$cmd,'0000000000','0100',0);
|
|
|
|
|
|
}
|
|
}
|
|
sleep(2);
|
|
sleep(2);
|