resetToDefault method
Implementation
Future<ScpStatus> resetToDefault(String deviceId) async {
log('reset to default for device: $deviceId');
final ScpStatus resetToDefaultResponse =
await ScpMessageSender.sendResetToDefault(
knownDevices.firstWhere((element) => element.deviceId == deviceId));
if (resetToDefaultResponse.status == ScpStatus.RESULT_SUCCESS) {
log('Successfully send reset to default to $deviceId');
return ScpStatus(status: ScpStatus.RESULT_SUCCESS);
} else {
log('Failed to send reset to default to $deviceId');
return ScpStatus(status: ScpStatus.RESULT_ERROR);
}
}