diff --git a/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php b/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php index c6ea3cd..cf7818e 100644 --- a/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php +++ b/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php @@ -952,8 +952,9 @@ class TelemetryController extends Controller foreach ($deviceIds as $deviceId) { $device = Device::find($deviceId); if ($device) { + $deviceType = $device->type; $telemetryValues = $this->getHealthConditionTelemetry($device); - $deviceHealth = $this->telemetryService->getDeviceHealth($telemetryValues); + $deviceHealth = $deviceType == 'Torque' ? 'green' : $this->telemetryService->getDeviceHealth($telemetryValues); match ($deviceHealth) { 'green' => $good++, diff --git a/app/Services/TelemetryService.php b/app/Services/TelemetryService.php index d7f8c10..0d823d8 100644 --- a/app/Services/TelemetryService.php +++ b/app/Services/TelemetryService.php @@ -54,10 +54,10 @@ class TelemetryService } break; - case 'OT': - case 'AT': - $val > 50 ? $hasRed = true : $hasOrange = true; - break; + // case 'OT': + // case 'AT': + // $val > 50 ? $hasRed = true : $hasOrange = true; + // break; case 'TDN': if ($val > 0 && $val < 401) { @@ -199,6 +199,7 @@ class TelemetryService 'red' => 'Alert', 'orange' => 'Attention', 'green' => 'Stable', + 'blue' => 'Stable', default => $t['threshold'] == 70 ? 'Stable' : 'Alert' }; } @@ -243,6 +244,7 @@ class TelemetryService 'health_status' => !$isActive ? 'Offline' : (in_array($displayNameMap[$key], ['Speed', 'RPM']) ? 'Offline' : $status), + // 'health_status' => $status, 'status_color' => !$isActive ? 'gray' : $statusColor, 'thresholds' => $thresholds, 'limit' => $thresholdLimits