mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix device version parsing and confirm it works with SHAs
This commit is contained in:
parent
041a04afc1
commit
18d526166f
2 changed files with 18 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ data class DeviceVersion(val asString: String) : Comparable<DeviceVersion>, Logg
|
|||
Regex("(\\d{1,2}).(\\d{1,2}).(\\d{1,2})").find(s)
|
||||
?: throw Exception("Can't parse version $s")
|
||||
val (major, minor, build) = match.destructured
|
||||
return major.toInt() * 1000 + minor.toInt() * 100 + build.toInt()
|
||||
return major.toInt() * 10000 + minor.toInt() * 100 + build.toInt()
|
||||
}
|
||||
|
||||
override fun compareTo(other: DeviceVersion): Int = asInt - other.asInt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue