Jing Li 2023-11-17 15:54:30 +08:00
parent d77cdbe10f
commit f46f16a98d
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] = 20.50;
$data[$device->monitoring_point][$_key] = 10.50;
}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(2400, 2600) / 100;
$data[$device->monitoring_point][$_key] = rand(900, 1100) / 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' => 20.50,
'temperature' => 10.50,
'turbidity' => 1028.60,
default => $value,
};
@ -394,7 +394,7 @@ class DeviceController extends Controller
'conductivity' => 563,
'oxygen' => 0.09,
'ph' => rand(750, 770) / 100,
'temperature' => rand(2400, 2600) / 100,
'temperature' => rand(900, 1100) / 100,
'turbidity' => 0.33,
default => null,
};