From 5b64f9eaa5063483ce911d0c474de927c18abdcd Mon Sep 17 00:00:00 2001 From: andrekir Date: Sun, 19 May 2024 08:35:23 -0300 Subject: [PATCH] feat: add paxcounter threshold configs --- .../config/PaxcounterConfigItemList.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/src/main/java/com/geeksville/mesh/ui/components/config/PaxcounterConfigItemList.kt b/app/src/main/java/com/geeksville/mesh/ui/components/config/PaxcounterConfigItemList.kt index f0d7f3245..0124db93e 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/components/config/PaxcounterConfigItemList.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/components/config/PaxcounterConfigItemList.kt @@ -53,6 +53,26 @@ fun PaxcounterConfigItemList( }) } + item { + EditTextPreference(title = "WiFi RSSI threshold (defaults to -80)", + value = paxcounterInput.wifiThreshold, + enabled = enabled, + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }), + onValueChanged = { + paxcounterInput = paxcounterInput.copy { wifiThreshold = it } + }) + } + + item { + EditTextPreference(title = "BLE RSSI threshold (defaults to -80)", + value = paxcounterInput.bleThreshold, + enabled = enabled, + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }), + onValueChanged = { + paxcounterInput = paxcounterInput.copy { bleThreshold = it } + }) + } + item { PreferenceFooter( enabled = paxcounterInput != paxcounterConfig,