mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2026-01-15 20:54:27 +01:00
Rename method
This commit is contained in:
@@ -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
|
||||
) {
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user