mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
add MyNodeInfo channelUtilization & airUtilTx
This commit is contained in:
parent
e6878e7087
commit
10886a9c98
2 changed files with 12 additions and 4 deletions
|
|
@ -16,7 +16,9 @@ data class MyNodeInfo(
|
|||
val currentPacketId: Long,
|
||||
val messageTimeoutMsec: Int,
|
||||
val minAppVersion: Int,
|
||||
val maxChannels: Int
|
||||
val maxChannels: Int,
|
||||
val channelUtilization: Float,
|
||||
val airUtilTx: Float
|
||||
) : Parcelable {
|
||||
/** A human readable description of the software/hardware version */
|
||||
val firmwareString: String get() = "$model $firmwareVersion"
|
||||
|
|
@ -31,8 +33,10 @@ data class MyNodeInfo(
|
|||
parcel.readLong(),
|
||||
parcel.readInt(),
|
||||
parcel.readInt(),
|
||||
parcel.readInt()
|
||||
)
|
||||
parcel.readInt(),
|
||||
parcel.readFloat(),
|
||||
parcel.readFloat()
|
||||
)
|
||||
|
||||
override fun writeToParcel(parcel: Parcel, flags: Int) {
|
||||
parcel.writeInt(myNodeNum)
|
||||
|
|
@ -45,6 +49,8 @@ data class MyNodeInfo(
|
|||
parcel.writeInt(messageTimeoutMsec)
|
||||
parcel.writeInt(minAppVersion)
|
||||
parcel.writeInt(maxChannels)
|
||||
parcel.writeFloat(channelUtilization)
|
||||
parcel.writeFloat(airUtilTx)
|
||||
}
|
||||
|
||||
override fun describeContents(): Int {
|
||||
|
|
|
|||
|
|
@ -1333,7 +1333,9 @@ class MeshService : Service(), Logging {
|
|||
currentPacketId.toLong() and 0xffffffffL,
|
||||
if (messageTimeoutMsec == 0) 5 * 60 * 1000 else messageTimeoutMsec, // constants from current device code
|
||||
minAppVersion,
|
||||
maxChannels
|
||||
maxChannels,
|
||||
channelUtilization,
|
||||
airUtilTx
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue