added some comments for clarity about how we should send the data to BE.

This commit is contained in:
Faris Armoush
2025-04-14 11:13:27 +03:00
parent 11feaf7c87
commit 9a2687d4c5

View File

@ -1,6 +1,7 @@
import 'package:syncrow_web/pages/routines/models/device_functions.dart';
import 'package:syncrow_web/utils/constants/assets.dart';
// TODO: functions in conditions / status in actions
class CpsOperationalValue {
final String icon;
final String description;
@ -222,6 +223,7 @@ final class CpsSpatialMotionValueFunction extends CpsFunctions {
}
final class CpsMaxDistanceOfDetectionFunction extends CpsFunctions {
// confirm with BE
CpsMaxDistanceOfDetectionFunction({
required super.deviceId,
required super.deviceName,
@ -265,7 +267,7 @@ final class CpsMaxDistanceOfStaticDetectionFunction extends CpsFunctions {
max = 10.0,
step = 0.5,
super(
code: 'static_max_dis',
code: 'static_max_dis', // 0 / 500
operationName: 'Maximum Distance Of Static Detection',
icon: Assets.currentDistanceIcon,
);
@ -300,7 +302,7 @@ final class CpsDetectionRangeFunction extends CpsFunctions {
max = 25.5,
step = 0.1,
super(
code: 'moving_range',
code: 'moving_range', // just then
operationName: 'Detection Range',
icon: Assets.farDetection,
);
@ -370,7 +372,7 @@ final class CpsPresenceJudgementThrsholdFunction extends CpsFunctions {
max = 255,
step = 5,
super(
code: 'presence_reference',
code: 'presence_reference', // max 255 // change widget
operationName: 'Presence Judgement Threshold',
icon: Assets.presenceJudgementThrshold,
);
@ -401,7 +403,7 @@ final class CpsMotionAmplitudeTriggerThresholdFunction extends CpsFunctions {
max = 255,
step = 5,
super(
code: 'moving_reference',
code: 'moving_reference', // max 255 // change widget
operationName: 'Motion Amplitude Trigger Threshold',
icon: Assets.presenceJudgementThrshold,
);
@ -432,7 +434,7 @@ final class CpsPerpetualBoundaryFunction extends CpsFunctions {
max = 5.00,
step = 0.50,
super(
code: 'perceptual_boundary',
code: 'perceptual_boundary', // 0 / 500
operationName: 'Perpetual Boundary',
icon: Assets.boundary,
);
@ -451,7 +453,7 @@ final class CpsPerpetualBoundaryFunction extends CpsFunctions {
return CpsOperationalValue(
icon: Assets.boundary,
description: '${value.toStringAsFixed(1)}M',
value: value,
value: value + 1200,
);
},
);
@ -467,7 +469,7 @@ final class CpsMotionTriggerBoundaryFunction extends CpsFunctions {
max = 5.0,
step = 0.5,
super(
code: 'moving_boundary',
code: 'moving_boundary', // 0 / 500 / step 50
operationName: 'Motion Trigger Boundary',
icon: Assets.motionMeter,
);
@ -502,7 +504,7 @@ final class CpsMotionTriggerTimeFunction extends CpsFunctions {
max = 2.0,
step = 0.1,
super(
code: 'moving_rigger_time',
code: 'moving_rigger_time', // 0 / 2000 steps 10
operationName: 'Motion Trigger Time',
icon: Assets.motionMeter,
);
@ -537,7 +539,7 @@ final class CpsMotionToStaticTimeFunction extends CpsFunctions {
max = 50.0,
step = 1.0,
super(
code: 'moving_static_time',
code: 'moving_static_time', // 0 / 6000 steps 100
operationName: 'Motion To Static Time',
icon: Assets.motionMeter,
);
@ -572,7 +574,7 @@ final class CpsEnteringNoBodyStateTimeFunction extends CpsFunctions {
max = 300.0,
step = 5.0,
super(
code: 'none_body_time',
code: 'none_body_time', // 0 / 300000 / steps 500
operationName: 'Entering Nobody State Time',
icon: Assets.motionMeter,
);
@ -604,7 +606,7 @@ final class CpsSelfTestResultFunctions extends CpsFunctions {
required super.deviceName,
required super.type,
}) : super(
code: 'checking_result',
code: 'checking_result', // just in action
operationName: 'Self-Test Result',
icon: Assets.selfTestResult,
);
@ -826,7 +828,7 @@ class CpsPresenceStatusFunctions extends CpsFunctions {
required super.deviceName,
required super.type,
}) : super(
code: 'presence_state',
code: 'presence_state', // just in action
operationName: 'Presence Status',
icon: Assets.presenceSensor,
);
@ -862,7 +864,7 @@ final class CpsSportsParaFunction extends CpsFunctions {
max = 100,
step = 1,
super(
code: 'sports_para',
code: 'sports_para', // just in action
operationName: 'Sports Para',
icon: Assets.sportsPara,
);