mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Refactor ceiling sensor functions and update slider helper mappings for improved value handling
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
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;
|
||||
@ -223,7 +222,6 @@ final class CpsSpatialMotionValueFunction extends CpsFunctions {
|
||||
}
|
||||
|
||||
final class CpsMaxDistanceOfDetectionFunction extends CpsFunctions {
|
||||
// confirm with BE
|
||||
CpsMaxDistanceOfDetectionFunction({
|
||||
required super.deviceId,
|
||||
required super.deviceName,
|
||||
@ -267,7 +265,7 @@ final class CpsMaxDistanceOfStaticDetectionFunction extends CpsFunctions {
|
||||
max = 10.0,
|
||||
step = 0.5,
|
||||
super(
|
||||
code: 'static_max_dis', // 0 / 500
|
||||
code: 'static_max_dis',
|
||||
operationName: 'Maximum Distance Of Static Detection',
|
||||
icon: Assets.currentDistanceIcon,
|
||||
);
|
||||
@ -302,7 +300,7 @@ final class CpsDetectionRangeFunction extends CpsFunctions {
|
||||
max = 25.5,
|
||||
step = 0.1,
|
||||
super(
|
||||
code: 'moving_range', // just then
|
||||
code: 'moving_range',
|
||||
operationName: 'Detection Range',
|
||||
icon: Assets.farDetection,
|
||||
);
|
||||
@ -372,7 +370,7 @@ final class CpsPresenceJudgementThrsholdFunction extends CpsFunctions {
|
||||
max = 255,
|
||||
step = 5,
|
||||
super(
|
||||
code: 'presence_reference', // max 255 // change widget
|
||||
code: 'presence_reference',
|
||||
operationName: 'Presence Judgement Threshold',
|
||||
icon: Assets.presenceJudgementThrshold,
|
||||
);
|
||||
@ -403,7 +401,7 @@ final class CpsMotionAmplitudeTriggerThresholdFunction extends CpsFunctions {
|
||||
max = 255,
|
||||
step = 5,
|
||||
super(
|
||||
code: 'moving_reference', // max 255 // change widget
|
||||
code: 'moving_reference',
|
||||
operationName: 'Motion Amplitude Trigger Threshold',
|
||||
icon: Assets.presenceJudgementThrshold,
|
||||
);
|
||||
@ -434,7 +432,7 @@ final class CpsPerpetualBoundaryFunction extends CpsFunctions {
|
||||
max = 5.00,
|
||||
step = 0.50,
|
||||
super(
|
||||
code: 'perceptual_boundary', // 0 / 500
|
||||
code: 'perceptual_boundary',
|
||||
operationName: 'Perpetual Boundary',
|
||||
icon: Assets.boundary,
|
||||
);
|
||||
@ -469,7 +467,7 @@ final class CpsMotionTriggerBoundaryFunction extends CpsFunctions {
|
||||
max = 5.0,
|
||||
step = 0.5,
|
||||
super(
|
||||
code: 'moving_boundary', // 0 / 500 / step 50
|
||||
code: 'moving_boundary',
|
||||
operationName: 'Motion Trigger Boundary',
|
||||
icon: Assets.motionMeter,
|
||||
);
|
||||
@ -504,7 +502,7 @@ final class CpsMotionTriggerTimeFunction extends CpsFunctions {
|
||||
max = 2.0,
|
||||
step = 0.1,
|
||||
super(
|
||||
code: 'moving_rigger_time', // 0 / 2000 steps 10
|
||||
code: 'moving_rigger_time',
|
||||
operationName: 'Motion Trigger Time',
|
||||
icon: Assets.motionMeter,
|
||||
);
|
||||
@ -539,7 +537,7 @@ final class CpsMotionToStaticTimeFunction extends CpsFunctions {
|
||||
max = 50.0,
|
||||
step = 1.0,
|
||||
super(
|
||||
code: 'moving_static_time', // 0 / 6000 steps 100
|
||||
code: 'moving_static_time',
|
||||
operationName: 'Motion To Static Time',
|
||||
icon: Assets.motionMeter,
|
||||
);
|
||||
@ -574,7 +572,7 @@ final class CpsEnteringNoBodyStateTimeFunction extends CpsFunctions {
|
||||
max = 300.0,
|
||||
step = 5.0,
|
||||
super(
|
||||
code: 'none_body_time', // 0 / 300000 / steps 500
|
||||
code: 'none_body_time',
|
||||
operationName: 'Entering Nobody State Time',
|
||||
icon: Assets.motionMeter,
|
||||
);
|
||||
@ -606,7 +604,7 @@ final class CpsSelfTestResultFunctions extends CpsFunctions {
|
||||
required super.deviceName,
|
||||
required super.type,
|
||||
}) : super(
|
||||
code: 'checking_result', // just in action
|
||||
code: 'checking_result',
|
||||
operationName: 'Self-Test Result',
|
||||
icon: Assets.selfTestResult,
|
||||
);
|
||||
@ -828,7 +826,7 @@ class CpsPresenceStatusFunctions extends CpsFunctions {
|
||||
required super.deviceName,
|
||||
required super.type,
|
||||
}) : super(
|
||||
code: 'presence_state', // just in action
|
||||
code: 'presence_state',
|
||||
operationName: 'Presence Status',
|
||||
icon: Assets.presenceSensor,
|
||||
);
|
||||
@ -864,7 +862,7 @@ final class CpsSportsParaFunction extends CpsFunctions {
|
||||
max = 100,
|
||||
step = 1,
|
||||
super(
|
||||
code: 'sports_para', // just in action
|
||||
code: 'sports_para',
|
||||
operationName: 'Sports Para',
|
||||
icon: Assets.sportsPara,
|
||||
);
|
||||
|
Reference in New Issue
Block a user