|
@@ -111,12 +111,32 @@ class Api extends CatchController
|
|
|
//打印原始的数据日志
|
|
|
debug_log("label_log","cssh: ".json_encode($DA));
|
|
|
|
|
|
- if($DA['rssi1']<=85||$DA['rssi2']<=85||$DA['rssi3']<=85||$DA['rssi4']<=85){
|
|
|
+ $rssiHi = 85;
|
|
|
+ if ($mac == '638007') {
|
|
|
+ # code...
|
|
|
+ $rssiHi = 60;
|
|
|
+ }
|
|
|
+ if($DA['rssi1']<=$rssiHi||$DA['rssi2']<=$rssiHi||$DA['rssi3']<=$rssiHi||$DA['rssi4']<=$rssiHi){
|
|
|
//原始数据只要其中有一条信号小于85 都存入redis 历史数据
|
|
|
$history_status=true;
|
|
|
}
|
|
|
-
|
|
|
- if($DA['rssi1']<=72||$DA['rssi2']<=72||$DA['rssi3']<=72||$DA['rssi4']<=72){
|
|
|
+ $rssiIn = 72;
|
|
|
+
|
|
|
+ //安装调测代码
|
|
|
+ $de_macs = ['638006','638007'];
|
|
|
+ $de_rfids = ['E2B6A925'];
|
|
|
+ if (in_array($mac, $de_macs) && in_array($label, $de_rfids)){
|
|
|
+ $deDa = $DA;
|
|
|
+ $deDa['time'] = date("Y-m-d H:i:s",$time);
|
|
|
+ $deLkey = 'debug_'.$mac.'_'. hexdec($label);
|
|
|
+ $ues_redis->lpush($deLkey,json_encode($deDa));
|
|
|
+ }
|
|
|
+ if ($mac == '638007') {
|
|
|
+ # code...
|
|
|
+ $rssiIn = 60;
|
|
|
+ }
|
|
|
+
|
|
|
+ if($DA['rssi1']<=$rssiIn||$DA['rssi2']<=$rssiIn||$DA['rssi3']<=$rssiIn||$DA['rssi4']<=$rssiIn){
|
|
|
//原始数据只要其中有一条信号小于72 都参与计算
|
|
|
$vs=true;
|
|
|
}
|
|
@@ -1111,6 +1131,7 @@ class Api extends CatchController
|
|
|
$info['status'] = 1;
|
|
|
|
|
|
// 临时功能代码
|
|
|
+ var_dump($info["id"]);
|
|
|
$labels = ['0200C1D1', '0200C1D2']; //测试设备
|
|
|
if (in_array(strtoupper($info['id']), $labels)) {
|
|
|
# code...
|
|
@@ -1120,6 +1141,7 @@ class Api extends CatchController
|
|
|
$where[] = ['field', '=','card_black'];
|
|
|
$bkList = Db::name('sys_config')->where($where)->find();
|
|
|
$bkList = explode(',', $bkList['fieldValue']);
|
|
|
+ // var_dump($info['id'],in_array(strtoupper($info['id']), $bkList),$bkList);
|
|
|
if (in_array(strtoupper($info['id']), $bkList)) {
|
|
|
# code...
|
|
|
$info['status'] = 3;
|
|
@@ -1134,7 +1156,7 @@ class Api extends CatchController
|
|
|
"label" => $info["id"],
|
|
|
"time" => $info["time"],
|
|
|
"first_time" => $info["first_time"],
|
|
|
- "dirt" => 1,
|
|
|
+ "dirt" => $info['status'],
|
|
|
"rssi" => $info["rssi"],//数组 [{"front":72,"behind":255,"left":255,"right":255,"time":1685067709},{"front":76,"behind":255,"left":255,"right":255,"time":1685067710}]
|
|
|
"avg" => $info["avg"] //{"front":"77.17","behind":"90.00","left":"90.00","right":"90.00"}
|
|
|
]
|
|
@@ -1150,7 +1172,7 @@ class Api extends CatchController
|
|
|
// var_dump($flagIn, $flagOut, $status, $avg["front"],$avg["behind"],$avg["left"], $avg["right"]);
|
|
|
// }
|
|
|
if($flagOut && $status == 1){
|
|
|
- if ($info["pushTime"] && (time()-$info['pushTime']) < 5 ) {
|
|
|
+ if ($info["pushTime"] && (time()-$info['pushTime']) < 2 ) {
|
|
|
# code...
|
|
|
return $info;
|
|
|
}
|
|
@@ -1235,7 +1257,6 @@ class Api extends CatchController
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 检测小程序版本版本 function
|
|
@@ -1253,7 +1274,10 @@ class Api extends CatchController
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+ public function testShellexec(){
|
|
|
+ $argv = $_SERVER['argv'];
|
|
|
+ var_dump($argv);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|