mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Enhance CeilingSensorHelper: Add deviceName and deviceId parameters to sensor functions
This commit is contained in:
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/pages/routines/bloc/functions_bloc/functions_bloc_bloc.dart';
|
||||
import 'package:syncrow_web/pages/routines/models/ceiling_presence_sensor_functions.dart';
|
||||
import 'package:syncrow_web/pages/routines/models/device_functions.dart';
|
||||
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/ceiling_sensor/ceiling_sensor_dialog.dart';
|
||||
|
||||
@ -33,4 +34,132 @@ abstract final class CeilingSensorHelper {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static List<DeviceFunction<CpsOperationalValue>> getCeilingSensorFunctions({
|
||||
required String uuid,
|
||||
required String name,
|
||||
}) {
|
||||
return [
|
||||
CpsRadarSwitchFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsSpatialParameterSwitchFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsSensitivityFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMovingSpeedFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsSpatialStaticValueFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsSpatialMotionValueFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsMaxDistanceOfDetectionFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMaxDistanceOfStaticDetectionFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsDetectionRangeFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsDistanceOfMovingObjectsFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsPresenceJudgementThrsholdFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMotionAmplitudeTriggerThresholdFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsPerpetualBoundaryFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMotionTriggerBoundaryFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMotionTriggerTimeFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMotionToStaticTimeFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsEnteringNoBodyStateTimeFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsSelfTestResultFunctions(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsNobodyTimeFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsMovementFunctions(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsCustomModeFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsSpaceTypeFunctions(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'BOTH',
|
||||
),
|
||||
CpsPresenceStatusFunctions(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
CpsSportsParaFunction(
|
||||
deviceName: name,
|
||||
deviceId: uuid,
|
||||
type: 'IF',
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user