feat: add new configs

This commit is contained in:
andrekir
2023-11-06 07:50:25 -03:00
parent ca0ee58be2
commit c6ad5dcfdf
2 changed files with 40 additions and 0 deletions

View File

@@ -199,6 +199,16 @@ fun ExternalNotificationConfigItemList(
)
}
item {
SwitchPreference(title = "Use I2S as buzzer",
checked = externalNotificationInput.useI2SAsBuzzer,
enabled = enabled,
onCheckedChange = {
externalNotificationInput = externalNotificationInput.copy { useI2SAsBuzzer = it }
})
}
item { Divider() }
item {
PreferenceFooter(
enabled = externalNotificationInput != extNotificationConfig || ringtoneInput != ringtone,

View File

@@ -103,6 +103,36 @@ fun TelemetryConfigItemList(
})
}
item {
SwitchPreference(title = "Power metrics module enabled",
checked = telemetryInput.powerMeasurementEnabled,
enabled = enabled,
onCheckedChange = {
telemetryInput = telemetryInput.copy { powerMeasurementEnabled = it }
})
}
item { Divider() }
item {
EditTextPreference(title = "Power metrics update interval (seconds)",
value = telemetryInput.powerUpdateInterval,
enabled = enabled,
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
onValueChanged = {
telemetryInput = telemetryInput.copy { powerUpdateInterval = it }
})
}
item {
SwitchPreference(title = "Power metrics on-screen enabled",
checked = telemetryInput.powerScreenEnabled,
enabled = enabled,
onCheckedChange = {
telemetryInput = telemetryInput.copy { powerScreenEnabled = it }
})
}
item { Divider() }
item {
PreferenceFooter(
enabled = telemetryInput != telemetryConfig,