sforkowany z mirror/meshtastic-android
add router role to lsEnabled
rodzic
18c8e1253f
commit
736d526b51
|
@ -1116,8 +1116,9 @@ class MeshService : Service(), Logging {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onRadioConnectionState(state: RadioServiceConnectionState) {
|
private fun onRadioConnectionState(state: RadioServiceConnectionState) {
|
||||||
// sleep now disabled by default on ESP32, permanent is true unless isPowerSaving enabled
|
// sleep now disabled by default on ESP32, permanent is true unless light sleep enabled
|
||||||
val lsEnabled = localConfig.power?.isPowerSaving ?: false
|
val isRouter = localConfig.device.role == ConfigProtos.Config.DeviceConfig.Role.ROUTER
|
||||||
|
val lsEnabled = localConfig.power.isPowerSaving || isRouter
|
||||||
val connected = state.isConnected
|
val connected = state.isConnected
|
||||||
val permanent = state.isPermanent || !lsEnabled
|
val permanent = state.isPermanent || !lsEnabled
|
||||||
onConnectionChanged(
|
onConnectionChanged(
|
||||||
|
|
Ładowanie…
Reference in New Issue