mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Alias strings R to Res (#3619)
This commit is contained in:
parent
a687328f08
commit
0833a6767e
153 changed files with 1403 additions and 1350 deletions
|
|
@ -18,11 +18,11 @@
|
|||
package org.meshtastic.core.model
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.meshtastic.core.strings.R
|
||||
import org.meshtastic.proto.ConfigProtos.Config.LoRaConfig
|
||||
import org.meshtastic.proto.ConfigProtos.Config.LoRaConfig.ModemPreset
|
||||
import org.meshtastic.proto.ConfigProtos.Config.LoRaConfig.RegionCode
|
||||
import kotlin.math.floor
|
||||
import org.meshtastic.core.strings.R as Res
|
||||
|
||||
/** hash a string into an integer using the djb2 algorithm by Dan Bernstein http://www.cse.yorku.ca/~oz/hash.html */
|
||||
private fun hash(name: String): UInt { // using UInt instead of Long to match RadioInterface.cpp results
|
||||
|
|
@ -297,13 +297,13 @@ enum class RegionInfo(
|
|||
}
|
||||
|
||||
enum class ChannelOption(val modemPreset: ModemPreset, @StringRes val labelRes: Int, val bandwidth: Float) {
|
||||
VERY_LONG_SLOW(ModemPreset.VERY_LONG_SLOW, R.string.label_very_long_slow, .0625f),
|
||||
LONG_FAST(ModemPreset.LONG_FAST, R.string.label_long_fast, .250f),
|
||||
LONG_MODERATE(ModemPreset.LONG_MODERATE, R.string.label_long_moderate, .125f),
|
||||
LONG_SLOW(ModemPreset.LONG_SLOW, R.string.label_long_slow, .125f),
|
||||
MEDIUM_FAST(ModemPreset.MEDIUM_FAST, R.string.label_medium_fast, .250f),
|
||||
MEDIUM_SLOW(ModemPreset.MEDIUM_SLOW, R.string.label_medium_slow, .250f),
|
||||
SHORT_TURBO(ModemPreset.SHORT_TURBO, R.string.label_short_turbo, bandwidth = .500f),
|
||||
SHORT_FAST(ModemPreset.SHORT_FAST, R.string.label_short_fast, .250f),
|
||||
SHORT_SLOW(ModemPreset.SHORT_SLOW, R.string.label_short_slow, .250f),
|
||||
VERY_LONG_SLOW(ModemPreset.VERY_LONG_SLOW, Res.string.label_very_long_slow, .0625f),
|
||||
LONG_FAST(ModemPreset.LONG_FAST, Res.string.label_long_fast, .250f),
|
||||
LONG_MODERATE(ModemPreset.LONG_MODERATE, Res.string.label_long_moderate, .125f),
|
||||
LONG_SLOW(ModemPreset.LONG_SLOW, Res.string.label_long_slow, .125f),
|
||||
MEDIUM_FAST(ModemPreset.MEDIUM_FAST, Res.string.label_medium_fast, .250f),
|
||||
MEDIUM_SLOW(ModemPreset.MEDIUM_SLOW, Res.string.label_medium_slow, .250f),
|
||||
SHORT_TURBO(ModemPreset.SHORT_TURBO, Res.string.label_short_turbo, bandwidth = .500f),
|
||||
SHORT_FAST(ModemPreset.SHORT_FAST, Res.string.label_short_fast, .250f),
|
||||
SHORT_SLOW(ModemPreset.SHORT_SLOW, Res.string.label_short_slow, .250f),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue