mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2026-01-16 05:04:22 +01:00
Added DFU in the homepage
This commit is contained in:
@@ -315,8 +315,26 @@ internal fun HomeView() {
|
||||
)
|
||||
}
|
||||
|
||||
else -> {
|
||||
// TODO: Add more profiles
|
||||
Profile.DFU -> {
|
||||
FeatureButton(
|
||||
iconId = R.drawable.ic_dfu,
|
||||
description = R.string.dfu_module_full,
|
||||
deviceName = peripheral.name,
|
||||
deviceAddress = peripheral.address,
|
||||
profileNames = services.map { it.profile.toString() },
|
||||
onClick = {
|
||||
onEvent(
|
||||
UiEvent.OnDeviceClick(
|
||||
peripheral.address,
|
||||
serviceManager.profile
|
||||
)
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Profile.BATTERY -> {
|
||||
// Battery service is handled above, do nothing here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user