mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
add packetid assignment to the phone side
This commit is contained in:
parent
b9b565e409
commit
b2d8b30d5b
3 changed files with 57 additions and 9 deletions
|
|
@ -13,7 +13,10 @@ data class MyNodeInfo(
|
|||
val model: String?,
|
||||
val firmwareVersion: String?,
|
||||
val couldUpdate: Boolean, // this application contains a software load we _could_ install if you want
|
||||
val shouldUpdate: Boolean // this device has old firmware
|
||||
val shouldUpdate: Boolean, // this device has old firmware
|
||||
val currentPacketId: Long,
|
||||
val nodeNumBits: Int,
|
||||
val packetIdBits: Int
|
||||
) : Parcelable {
|
||||
/** A human readable description of the software/hardware version */
|
||||
val firmwareString: String get() = "$model $region/$firmwareVersion"
|
||||
|
|
@ -25,7 +28,10 @@ data class MyNodeInfo(
|
|||
parcel.readString(),
|
||||
parcel.readString(),
|
||||
parcel.readByte() != 0.toByte(),
|
||||
parcel.readByte() != 0.toByte()
|
||||
parcel.readByte() != 0.toByte(),
|
||||
parcel.readLong(),
|
||||
parcel.readInt(),
|
||||
parcel.readInt()
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -37,6 +43,9 @@ data class MyNodeInfo(
|
|||
parcel.writeString(firmwareVersion)
|
||||
parcel.writeByte(if (couldUpdate) 1 else 0)
|
||||
parcel.writeByte(if (shouldUpdate) 1 else 0)
|
||||
parcel.writeLong(currentPacketId)
|
||||
parcel.writeInt(nodeNumBits)
|
||||
parcel.writeInt(packetIdBits)
|
||||
}
|
||||
|
||||
override fun describeContents(): Int {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue