mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
reformat per coding conventions
This commit is contained in:
parent
2c75d0dee7
commit
5b653d29f8
29 changed files with 207 additions and 149 deletions
|
|
@ -1,14 +1,29 @@
|
|||
package com.geeksville.mesh.model
|
||||
|
||||
import com.geeksville.mesh.ChannelProtos
|
||||
import com.geeksville.mesh.MeshProtos
|
||||
import com.geeksville.mesh.R
|
||||
|
||||
enum class ChannelOption(val modemConfig: ChannelProtos.ChannelSettings.ModemConfig, val configRes: Int, val minBroadcastPeriodSecs: Int) {
|
||||
enum class ChannelOption(
|
||||
val modemConfig: ChannelProtos.ChannelSettings.ModemConfig,
|
||||
val configRes: Int,
|
||||
val minBroadcastPeriodSecs: Int
|
||||
) {
|
||||
SHORT(ChannelProtos.ChannelSettings.ModemConfig.Bw500Cr45Sf128, R.string.modem_config_short, 3),
|
||||
MEDIUM(ChannelProtos.ChannelSettings.ModemConfig.Bw125Cr45Sf128, R.string.modem_config_medium, 12),
|
||||
LONG(ChannelProtos.ChannelSettings.ModemConfig.Bw31_25Cr48Sf512, R.string.modem_config_long, 240),
|
||||
VERY_LONG(ChannelProtos.ChannelSettings.ModemConfig.Bw125Cr48Sf4096, R.string.modem_config_very_long, 375);
|
||||
MEDIUM(
|
||||
ChannelProtos.ChannelSettings.ModemConfig.Bw125Cr45Sf128,
|
||||
R.string.modem_config_medium,
|
||||
12
|
||||
),
|
||||
LONG(
|
||||
ChannelProtos.ChannelSettings.ModemConfig.Bw31_25Cr48Sf512,
|
||||
R.string.modem_config_long,
|
||||
240
|
||||
),
|
||||
VERY_LONG(
|
||||
ChannelProtos.ChannelSettings.ModemConfig.Bw125Cr48Sf4096,
|
||||
R.string.modem_config_very_long,
|
||||
375
|
||||
);
|
||||
|
||||
companion object {
|
||||
fun fromConfig(modemConfig: ChannelProtos.ChannelSettings.ModemConfig?): ChannelOption? {
|
||||
|
|
@ -18,6 +33,7 @@ enum class ChannelOption(val modemConfig: ChannelProtos.ChannelSettings.ModemCon
|
|||
}
|
||||
return null
|
||||
}
|
||||
|
||||
val defaultMinBroadcastPeriod = VERY_LONG.minBroadcastPeriodSecs
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue