small fix
This commit is contained in:
1 parent
0ec5c9cc9c
commit
6a9581ba69
2 files changed
+3
-3
No files matched your search
@@ -173,7 +173,7 @@ class CIoT {
|
||||
* @param $deviceId
|
||||
*/
|
||||
public static function getSensorAllData($deviceId){
|
||||
for($i=1; $i<11; $i++) {
|
||||
for($i=1; $i<5; $i++) {
|
||||
$res = self::$DB->query('SELECT * FROM sensors WHERE device="'.$deviceId.'" and sensor="ds'.($i).'" ORDER BY id DESC LIMIT 1');
|
||||
if($res) {
|
||||
$result['ds'.$i]['sensor'] = $res[0]['sensor'];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
require_once __DIR__ . '/inc/bootstrap.php';
|
||||
require_once __DIR__ . '/inc/header.php';
|
||||
|
||||
$cacheId = md5('CIoT::getDallasArrData_'.$USER['deviceId']);
|
||||
$cacheId = md5('CIoT::getSensorsArrData_'.$USER['deviceId']);
|
||||
|
||||
if(CCache::check($cacheId) and CCache::getAge($cacheId) < 60) {
|
||||
$arSensors = CCache::get($cacheId);
|
||||
@@ -70,7 +70,7 @@ if(CCache::check($cacheId) and CCache::getAge($cacheId) < 60) {
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
}, 3000);
|
||||
}, 30000);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user