dev
Jing Li 2023-11-17 15:57:02 +08:00
parent f46f16a98d
commit ef1eb76159
1 changed files with 4 additions and 4 deletions

View File

@ -249,7 +249,7 @@ class DeviceController extends Controller
if($deviceColumn == 'ph'){
$data[$device->monitoring_point][$_key] = 7.49;
}elseif($deviceColumn == 'temperature'){
$data[$device->monitoring_point][$_key] = 10.50;
$data[$device->monitoring_point][$_key] = 10.00;
}elseif($deviceColumn == 'turbidity'){
$data[$device->monitoring_point][$_key] = 1028.60;
}else{
@ -270,7 +270,7 @@ class DeviceController extends Controller
$data[$device->monitoring_point][$_key] = rand(750, 770) / 100;
break;
case 'temperature':
$data[$device->monitoring_point][$_key] = rand(900, 1100) / 100;
$data[$device->monitoring_point][$_key] = rand(950, 1050) / 100;
break;
case 'turbidity':
$data[$device->monitoring_point][$_key] = 0.33;
@ -381,7 +381,7 @@ class DeviceController extends Controller
if (is_null($value = $device->{$deviceColumn})) {
$value = match ($deviceColumn) {
'ph' => 7.49,
'temperature' => 10.50,
'temperature' => 10.00,
'turbidity' => 1028.60,
default => $value,
};
@ -605,7 +605,7 @@ class DeviceController extends Controller
$data[$key] = rand(750, 770) / 100;
break;
case 'temperature':
$data[$key] = rand(2400, 2600) / 100;
$data[$key] = rand(950, 1050) / 100;
break;
case 'turbidity':
$data[$key] = 0.33;