cph-cachet / carp.sensing-flutter

CARP Mobile Sensing for Flutter, including mobile sensing framework, data backend support, and the CARP mobile sensing app.
MIT License
80 stars 28 forks source link

PeriodicTrigger isn't stopped #379

Closed bardram closed 7 months ago

bardram commented 7 months ago

In the example app, the PeriodicTrigger

    protocol.addTaskControl(
      PeriodicTrigger(period: const Duration(seconds: 10)),
      BackgroundTask(
        measures: [
          Measure(type: SensorSamplingPackage.ACCELERATION)
            ..overrideSamplingConfiguration = IntervalSamplingConfiguration(
                interval: const Duration(milliseconds: 500)),
          Measure(type: SensorSamplingPackage.ROTATION),
        ],
        duration: const IsoDuration(seconds: 1),
      ),
      phone,
    );

is not stopped when stopping the study with the STOP button in the example app. Keeps running and sampling acc + gyro data.