fix(release): fixes to prep for release (#4546)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-02-12 14:23:19 -06:00 committed by GitHub
parent c5f2b1bbea
commit 80d9a2e0aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 2324 additions and 312 deletions

View file

@ -27,6 +27,7 @@ import okio.ByteString
import okio.ByteString.Companion.toByteString
import org.meshtastic.core.model.util.ByteStringParceler
import org.meshtastic.core.model.util.ByteStringSerializer
import org.meshtastic.proto.MeshPacket
import org.meshtastic.proto.PortNum
import org.meshtastic.proto.Waypoint
@ -70,6 +71,8 @@ data class DataPacket(
@Serializable(with = ByteStringSerializer::class)
@TypeParceler<ByteString?, ByteStringParceler>
var sfppHash: ByteString? = null,
/** The transport mechanism this packet arrived over (see [MeshPacket.TransportMechanism]). */
var transportMechanism: Int = 0,
) : Parcelable {
fun readFromParcel(parcel: Parcel) {
@ -108,6 +111,7 @@ data class DataPacket(
viaMqtt = parcel.readInt() != 0
emoji = parcel.readInt()
sfppHash = ByteStringParceler.create(parcel)
transportMechanism = parcel.readInt()
}
/** If there was an error with this message, this string describes what was wrong. */

View file

@ -200,6 +200,7 @@ data class NodeInfo(
var channel: Int = 0,
var environmentMetrics: EnvironmentMetrics? = null,
var hopsAway: Int = 0,
var nodeStatus: String? = null,
) : Parcelable {
@Suppress("MagicNumber")

View file

@ -68,3 +68,9 @@ fun Int.mpsToMph(): Float {
val mph = this * MPS_TO_KMPH * KM_TO_MILES
return mph
}
/** Returns true if this packet arrived via a LoRa transport mechanism. */
fun MeshPacket.isLora(): Boolean = transport_mechanism == MeshPacket.TransportMechanism.TRANSPORT_LORA ||
transport_mechanism == MeshPacket.TransportMechanism.TRANSPORT_LORA_ALT1 ||
transport_mechanism == MeshPacket.TransportMechanism.TRANSPORT_LORA_ALT2 ||
transport_mechanism == MeshPacket.TransportMechanism.TRANSPORT_LORA_ALT3