From 040e3cc62dc5ea3cedfc3993cc8a3a80b3f5687c Mon Sep 17 00:00:00 2001 From: Nikhil Kadam Date: Thu, 15 May 2025 15:28:59 +0530 Subject: [PATCH] Setting threshold to Torque device --- app/Services/TelemetryService.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Services/TelemetryService.php b/app/Services/TelemetryService.php index db259ca..c48e6b5 100644 --- a/app/Services/TelemetryService.php +++ b/app/Services/TelemetryService.php @@ -70,7 +70,7 @@ class TelemetryService 'PowerLoss_value' => [ ['threshold' => 2.5, 'color' => 'green'], ['threshold' => 5, 'color' => 'orange'], - ['threshold' => 7.55, 'color' => 'red'] + ['threshold' => 7.5, 'color' => 'red'] ], 'GlobalLevel_value' => [ ['threshold' => 2, 'color' => 'green'], @@ -89,7 +89,7 @@ class TelemetryService { return [ 'ChannelSpeed' => [ - ['min' => 0, 'color' => 5000] + ['min' => 0, 'color' => 50000] ], 'PowerLoss_value' => [ ['min' => 0, 'color' => 10] @@ -97,6 +97,12 @@ class TelemetryService 'GlobalLevel_value' => [ ['min' => 0, 'color' => 10] ], + 'StaticTorque_value' => [ + ['min' => 0, 'color' => 50000] + ], + 'StaticPower_value' => [ + ['min' => 0, 'color' => 500000] + ], 'default' => [ ['min' => 0, 'color' => 100] ] @@ -136,7 +142,7 @@ class TelemetryService $transformedTelemetry[] = [ 'display_name' => $displayNameMap[$key] ?? $key, - 'value' => (string)$value, + 'value' => number_format((float)$value, 2), 'health_status' => $status, 'thresholds' => $thresholds, 'limit' => $thresholdLimits