Parcourir la source

Merge branch 'master' of http://gogs.renlianiot.com:4000/zmcoding/station-test-api

likang il y a 1 an
Parent
commit
b668b62354

+ 5 - 5
catch/api/controller/Api.php

@@ -314,7 +314,7 @@ class Api extends CatchController
             $data=json_decode($jsonData,true);
             // debug_log("InAndOUT",$data['cnt']);
             $time=$data['time'];
-            $mac=$data['mac'];
+            $mac=$data['devId'];
             $text=$text.$data['cnt'];
             
             if(strlen($text)<24){
@@ -542,10 +542,10 @@ class Api extends CatchController
                         $sum4 = 0;
                         foreach ($rssisArr as $k => $v) {
                             # code...
-                            $sum1 += ($v["front"] == 255 ? 85 : $v["front"]);
-                            $sum2 += ($v["behind"] == 255 ? 85 : $v["behind"]);
-                            $sum3 += ($v["left"] == 255 ? 85 : $v["left"]);
-                            $sum4 += ($v["right"] == 255 ? 85 : $v["right"]);
+                            $sum1 += ($v["front"] == 255 ? 90 : $v["front"]);
+                            $sum2 += ($v["behind"] == 255 ? 90 : $v["behind"]);
+                            $sum3 += ($v["left"] == 255 ? 90 : $v["left"]);
+                            $sum4 += ($v["right"] == 255 ? 90 : $v["right"]);
                         }
                         $info["avg"] = [
                             "front" => number_format( $sum1/$cacCount, 2 ),

+ 2 - 2
task_script/PAREA_STATUS_UPDATE.php

@@ -6,8 +6,8 @@ use think\facade\Cache;
 date_default_timezone_set("PRC");
 define('HOST', '127.0.0.1');
 define('PORT', '6379');
-define('PASSWORD', '123456');
-define('DATABASE', 3);
+define('PASSWORD', 'R!478gH*%23nPn');
+define('DATABASE', 2);
 
 
 function app_redis()

+ 2 - 2
task_script/RL4RSSI_PAREA_MQTT.php

@@ -6,8 +6,8 @@ use think\facade\Cache;
 date_default_timezone_set("PRC");
 define('HOST', '127.0.0.1');
 define('PORT', '6379');
-define('PASSWORD', '123456');
-define('DATABASE', 3);
+define('PASSWORD', 'R!478gH*%23nPn');
+define('DATABASE', 2);
 
 
 function app_redis()