diff --git a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt index 461c5500..729f3cb1 100644 --- a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt +++ b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/repository/channelSounding/ChannelSoundingManager.kt @@ -140,7 +140,7 @@ internal class ChannelSoundingManager @Inject constructor( * @param updateRate The desired update rate for ranging measurements. Default is [UpdateRate.NORMAL]. */ @RequiresApi(Build.VERSION_CODES.BAKLAVA) - fun addDeviceToRangingSession( + fun startRangingMeasurement( device: String, updateRate: UpdateRate = UpdateRate.NORMAL ) { diff --git a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt index bbb4c690..dedb61bd 100644 --- a/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt +++ b/profile/src/main/java/no/nordicsemi/android/toolbox/profile/viewmodel/ChannelSoundingViewModel.kt @@ -83,7 +83,7 @@ internal class ChannelSoundingViewModel @Inject constructor( }.launchIn(viewModelScope) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA) { try { - channelSoundingManager.addDeviceToRangingSession(address, rate) + channelSoundingManager.startRangingMeasurement(address, rate) } catch (e: Exception) { Timber.e("${e.message}") } @@ -104,7 +104,7 @@ internal class ChannelSoundingViewModel @Inject constructor( viewModelScope.launch { if (_channelSoundingServiceState.value.updateRate != event.frequency) { channelSoundingManager.closeSession(address) { - channelSoundingManager.addDeviceToRangingSession( + channelSoundingManager.startRangingMeasurement( address, event.frequency ) @@ -131,7 +131,7 @@ internal class ChannelSoundingViewModel @Inject constructor( try { viewModelScope.launch { channelSoundingManager.closeSession(address) { - channelSoundingManager.addDeviceToRangingSession( + channelSoundingManager.startRangingMeasurement( address, _channelSoundingServiceState.value.updateRate )