Misfiring cylinder visible for gas engine
This commit is contained in:
@@ -1403,10 +1403,10 @@ class TelemetryController extends Controller
|
||||
return response()->json(['success' => true, 'message' => 'Device not found'], 404);
|
||||
}
|
||||
|
||||
$data = Cache::remember($cacheKey, now()->addHours(value: 1), function () use ($deviceId) {
|
||||
// $data = Cache::remember($cacheKey, now()->addHours(value: 1), function () use ($deviceId) {
|
||||
$device = Device::find($deviceId, ['device_profile_id', 'type']);
|
||||
$profileId = $device->device_profile_id;
|
||||
$isGasEngine = $device->type === 'Gas Engine Profile';
|
||||
$isGasEngine = $device->type === 'Gas Engine';
|
||||
|
||||
$cylindersToShow = ['Compression Condition','Injection Condition','Bearing Condition','Condition of Cyl Moving Parts'];
|
||||
if ($isGasEngine) {
|
||||
@@ -1476,10 +1476,10 @@ class TelemetryController extends Controller
|
||||
];
|
||||
}
|
||||
|
||||
return ['success' => true, 'data' => $data];
|
||||
});
|
||||
$response = ['success' => true, 'data' => $data];
|
||||
// });
|
||||
|
||||
return response()->json($data);
|
||||
return response()->json($response);
|
||||
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['success' => false, 'message' => $e->getMessage()], 500);
|
||||
|
||||
Reference in New Issue
Block a user