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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -93,8 +93,10 @@ import org.meshtastic.core.database.entity.TracerouteNodePositionEntity
AutoMigration(from = 32, to = 33),
AutoMigration(from = 33, to = 34, spec = AutoMigration33to34::class),
AutoMigration(from = 34, to = 35, spec = AutoMigration34to35::class),
AutoMigration(from = 35, to = 36),
AutoMigration(from = 36, to = 37),
],
version = 35,
version = 37,
exportSchema = true,
)
@TypeConverters(Converters::class)

View file

@ -33,6 +33,7 @@ import org.meshtastic.core.model.Position
import org.meshtastic.core.model.util.onlineTimeThreshold
import org.meshtastic.proto.DeviceMetadata
import org.meshtastic.proto.HardwareModel
import org.meshtastic.proto.MeshPacket
import org.meshtastic.proto.Paxcount
import org.meshtastic.proto.Telemetry
import org.meshtastic.proto.User
@ -65,6 +66,7 @@ data class NodeWithRelations(
notes = notes,
manuallyVerified = manuallyVerified,
nodeStatus = nodeStatus,
lastTransport = lastTransport,
)
}
@ -89,6 +91,7 @@ data class NodeWithRelations(
notes = notes,
manuallyVerified = manuallyVerified,
nodeStatus = nodeStatus,
lastTransport = lastTransport,
)
}
}
@ -140,6 +143,8 @@ data class NodeEntity(
@ColumnInfo(name = "manually_verified", defaultValue = "0")
var manuallyVerified: Boolean = false, // ONLY set true when scanned/imported manually
@ColumnInfo(name = "node_status") var nodeStatus: String? = null,
/** The transport mechanism this node was last heard over (see [MeshPacket.TransportMechanism]). */
@ColumnInfo(name = "last_transport", defaultValue = "0") var lastTransport: Int = 0,
) {
val deviceMetrics: org.meshtastic.proto.DeviceMetrics?
get() = deviceTelemetry.device_metrics
@ -199,6 +204,7 @@ data class NodeEntity(
publicKey = publicKey ?: user.public_key,
notes = notes,
nodeStatus = nodeStatus,
lastTransport = lastTransport,
)
fun toNodeInfo() = NodeInfo(
@ -243,5 +249,6 @@ data class NodeEntity(
environmentTelemetry.time,
),
hopsAway = hopsAway,
nodeStatus = nodeStatus,
)
}

View file

@ -58,6 +58,7 @@ data class PacketEntity(
relayNode = data.relayNode,
relays = data.relays,
filtered = filtered,
transportMechanism = data.transportMechanism,
)
}
}

View file

@ -46,6 +46,7 @@ import org.meshtastic.core.strings.routing_error_rate_limit_exceeded
import org.meshtastic.core.strings.routing_error_timeout
import org.meshtastic.core.strings.routing_error_too_large
import org.meshtastic.core.strings.unrecognized
import org.meshtastic.proto.MeshPacket
import org.meshtastic.proto.Routing
@Suppress("CyclomaticComplexMethod")
@ -92,6 +93,8 @@ data class Message(
val relayNode: Int? = null,
val relays: Int = 0,
val filtered: Boolean = false,
/** The transport mechanism this packet arrived over (see [MeshPacket.TransportMechanism]). */
val transportMechanism: Int = 0,
) {
fun getStatusStringRes(): Pair<StringResource, StringResource> {
val title = if (routingError > 0) Res.string.error else Res.string.message_delivery_status

View file

@ -29,9 +29,11 @@ import org.meshtastic.proto.DeviceMetadata
import org.meshtastic.proto.DeviceMetrics
import org.meshtastic.proto.EnvironmentMetrics
import org.meshtastic.proto.HardwareModel
import org.meshtastic.proto.MeshPacket
import org.meshtastic.proto.Paxcount
import org.meshtastic.proto.Position
import org.meshtastic.proto.PowerMetrics
import org.meshtastic.proto.Telemetry
import org.meshtastic.proto.User
@Suppress("MagicNumber")
@ -57,6 +59,8 @@ data class Node(
val notes: String = "",
val manuallyVerified: Boolean = false,
val nodeStatus: String? = null,
/** The transport mechanism this node was last heard over (see [MeshPacket.TransportMechanism]). */
val lastTransport: Int = 0,
) {
val capabilities: Capabilities by lazy { Capabilities(metadata?.firmware_version) }
@ -175,6 +179,32 @@ data class Node(
fun getTelemetryStrings(isFahrenheit: Boolean = false): List<String> =
environmentMetrics.getDisplayStrings(isFahrenheit)
fun toEntity() = NodeEntity(
num = num,
user = user,
position = position,
latitude = latitude,
longitude = longitude,
snr = snr,
rssi = rssi,
lastHeard = lastHeard,
deviceTelemetry = Telemetry(device_metrics = deviceMetrics),
channel = channel,
viaMqtt = viaMqtt,
hopsAway = hopsAway,
isFavorite = isFavorite,
isIgnored = isIgnored,
isMuted = isMuted,
environmentTelemetry = Telemetry(environment_metrics = environmentMetrics),
powerTelemetry = Telemetry(power_metrics = powerMetrics),
paxcounter = paxcounter,
publicKey = publicKey ?: user.public_key,
notes = notes,
manuallyVerified = manuallyVerified,
nodeStatus = nodeStatus,
lastTransport = lastTransport,
)
}
fun Config.DeviceConfig.Role?.isUnmessageableRole(): Boolean = this in