mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-31 04:04:46 -04:00
set allowSpecialFloatingPointValues
This commit is contained in:
@@ -297,7 +297,7 @@ class MeshService : Service(), Logging {
|
||||
myInfo = myInfo,
|
||||
nodeDB = nodeDBbyNodeNum.values.toTypedArray(),
|
||||
)
|
||||
val json = Json { isLenient = true }
|
||||
val json = Json { isLenient = true; allowSpecialFloatingPointValues = true }
|
||||
val asString = json.encodeToString(MeshServiceSettingsData.serializer(), settings)
|
||||
debug("Saving settings")
|
||||
getPrefs().edit {
|
||||
@@ -325,7 +325,7 @@ class MeshService : Service(), Logging {
|
||||
try {
|
||||
getPrefs().getString("json", null)?.let { asString ->
|
||||
|
||||
val json = Json { isLenient = true }
|
||||
val json = Json { isLenient = true; allowSpecialFloatingPointValues = true }
|
||||
val settings = json.decodeFromString(MeshServiceSettingsData.serializer(), asString)
|
||||
installNewNodeDB(settings.myInfo, settings.nodeDB)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user