feat: auto retry text message send on max retransmit (#4124)

This commit is contained in:
Mac DeCourcy 2026-01-03 04:21:43 -08:00 committed by GitHub
parent c9259c793f
commit 6bb40e4d20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 64 additions and 8 deletions

View file

@ -63,6 +63,7 @@ data class DataPacket(
var relayNode: Int? = null,
var relays: Int = 0,
var viaMqtt: Boolean = false, // True if this packet passed via MQTT somewhere along its path
var retryCount: Int = 0, // Number of automatic retry attempts
var emoji: Int = 0,
) : Parcelable {
@ -139,6 +140,7 @@ data class DataPacket(
parcel.readInt().let { if (it == -1) null else it },
parcel.readInt(), // relays
parcel.readInt() == 1, // viaMqtt
parcel.readInt(), // retryCount
parcel.readInt(), // emoji
)
@ -164,6 +166,7 @@ data class DataPacket(
if (rssi != other.rssi) return false
if (replyId != other.replyId) return false
if (relayNode != other.relayNode) return false
if (retryCount != other.retryCount) return false
if (emoji != other.emoji) return false
return true
@ -185,6 +188,7 @@ data class DataPacket(
result = 31 * result + rssi
result = 31 * result + replyId.hashCode()
result = 31 * result + relayNode.hashCode()
result = 31 * result + retryCount
result = 31 * result + emoji
return result
}
@ -207,6 +211,7 @@ data class DataPacket(
parcel.writeInt(relayNode ?: -1)
parcel.writeInt(relays)
parcel.writeInt(if (viaMqtt) 1 else 0)
parcel.writeInt(retryCount)
parcel.writeInt(emoji)
}
@ -231,6 +236,7 @@ data class DataPacket(
relayNode = parcel.readInt().let { if (it == -1) null else it }
relays = parcel.readInt()
viaMqtt = parcel.readInt() == 1
retryCount = parcel.readInt()
emoji = parcel.readInt()
}