start method
Starts the accelerometer and gyroscope at the specified frequencyHz.
High frequency (e.g. 100Hz) is recommended for motion analysis.
Implementation
Future<bool> start({int frequencyHz = 60}) async {
if (frequencyHz <= 0) {
throw ArgumentError.value(
frequencyHz,
'frequencyHz',
'Must be greater than zero.',
);
}
final success = await NexoraSdkPlatform.instance.startSensor(
frequencyHz: frequencyHz,
);
if (success) {
_isRunning = true;
_lastFrequencyHz = frequencyHz;
}
return success;
}