Преглед на файлове

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

likang преди 1 година
родител
ревизия
5f068a952f
променени са 2 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 6 2
      catch/api/controller/Api.php
  2. 3 1
      task_script/PAREA_STATUS_UPDATE.php

+ 6 - 2
catch/api/controller/Api.php

@@ -722,7 +722,9 @@ class Api extends CatchController
                     [
                         "label" => $info["id"],
                         "time" => $info["time"],
-                        "dirt" => 1
+                        "dirt" => 1,
+                        "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"}
                     ]
                 ]
             ];
@@ -747,7 +749,9 @@ class Api extends CatchController
                     [
                         "label" => $info["id"],
                         "time" => $info["time"],
-                        "dirt" => 2
+                        "dirt" => 2,
+                        "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"}
                     ]
                 ]
             ];

+ 3 - 1
task_script/PAREA_STATUS_UPDATE.php

@@ -238,7 +238,9 @@ while (true) {
                             [
                                 "label" => $data["id"],
                                 "time" => time(),
-                                "dirt" => 2
+                                "dirt" => 2,
+                                "rssi" => $data["rssi"],
+                                "avg" => $data["avg"] 
                             ]
                         ]
                     ];