InternalRotationTask constructor

InternalRotationTask({
  1. required String identifier,
  2. SromMeasure? measure,
})

Constructs the InternalRotationTask and initializes all required steps and configurations. Sets up the SROM internal rotation test sequence, sensor configuration, and probe.

Implementation

InternalRotationTask({required super.identifier, SromMeasure? measure}) : super(steps: []) {
  // Use provided measure or default
  this.measure = measure ?? this.measure;

  // Configure the SROM test (sensor location, sampling rates, etc)
  config = SromConfig(
    sensorLocation: SensorLocation.upperArm,
    gyroscopeSamplingRate: 104.0,
    useAccelerometer: false,
    useGyroscope: true,
    useMagnetometer: false,
  );

  // Initialize the probe with Movesense sensor and config
  probe = MobilityProbe(
    config: config,
    sensor: MovesenseSensor(),
  );

  // Build the complete test sequence with all required steps
  steps.addAll([
    // Introduction and overview step
    RPInstructionStep(
      identifier: 'intro',
      title: 'srom_test_title_internal_rotation',
      text: 'srom_test_description_internal_rotation',
    ),
    // Preparation step (equipment, positioning, etc)
    InternalRotationPreparationStep(identifier: 'internal_rotation_preparation', title: 'preparation'),
    // Test instructions and procedure explanation
    InternalRotationInstructionsStep(identifier: 'internal_rotation_instructions', title: 'instructions'),
    // Countdown timer before test execution
    RPTimerStep(
      identifier: 'prepare',
      title: 'get_ready',
      timeout: const Duration(seconds: 3),
      autoSkip: true,
    ),
    // Main SROM test execution step
    _buildSromTestStep(),
    // Result display step
    SromResultStep(identifier: 'srom_result_internal_rotation', title: 'test_completed', text: 'test_completed_rotation')
  ]);
}