|
@@ -80,7 +80,7 @@ class ShouhuanCommand
|
|
|
if ('send' == $config['kind']) {
|
|
|
$content = $config['content'];
|
|
|
$useconmmand = $content['command'];
|
|
|
- $content_custom = isset($config['content_custom']) ? $config['content_custom'] : false;
|
|
|
+ $content_custom = isset($content['content_custom']) ? $content['content_custom'] : false;
|
|
|
$need_back = $config['need_back'];
|
|
|
if ($content_custom) {
|
|
|
$functionname = 'get' . $command . "Commandinfo";
|
|
@@ -675,10 +675,25 @@ class ShouhuanCommand
|
|
|
$this->createsendmsg($facility_id, $device_id_code, $command, [], $sys_user_id);
|
|
|
}
|
|
|
//设置 跌倒报警开关
|
|
|
- public function createfalldowncommand($facility_id, $device_id_code, $is_open, $sys_user_id)
|
|
|
+ public function createfalldowncommand($facility_id, $device_id_code, $param, $sys_user_id)
|
|
|
{
|
|
|
- $command = ['command' => 'FALLDOWN', 'content_arr' => ['command' => 'FALLDOWN', 'is_open' => $is_open]];
|
|
|
+ $command = ['command' => 'FALLDOWN', 'content_arr' => ['command' => 'FALLDOWN', 'is_open' => $param['is_open']]];
|
|
|
$this->createsendmsg($facility_id, $device_id_code, $command, [], $sys_user_id);
|
|
|
+ $lssetparam = [];
|
|
|
+ switch ($param['lsset_type']) {
|
|
|
+ case '1':
|
|
|
+ $lssetparam = [3, 6];
|
|
|
+ break;
|
|
|
+ case '2':
|
|
|
+ $lssetparam = [6, 9];
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ $lssetparam = [9, 12];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ $command = ['command' => 'LSSET', 'content_arr' => ['command' => 'LSSET']];
|
|
|
+ $this->createsendmsg($facility_id, $device_id_code, $command, $lssetparam, $sys_user_id);
|
|
|
+
|
|
|
}
|
|
|
/**
|
|
|
* 睡眠时间段设置
|