Skip to content

Commit 24729ba

Browse files
committed
merge conflicts
1 parent 12505d2 commit 24729ba

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

app/src/main/java/com/geeksville/mesh/service/MeshService.kt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ import org.meshtastic.proto.telemetry
124124
import org.meshtastic.proto.user
125125
import timber.log.Timber
126126
import java.util.ArrayDeque
127+
import java.util.Locale
127128
import java.util.UUID
128129
import java.util.concurrent.ConcurrentHashMap
129130
import javax.inject.Inject
@@ -865,6 +866,7 @@ class MeshService : Service() {
865866
}
866867

867868
Portnums.PortNum.ROUTING_APP_VALUE -> {
869+
Timber.d("Received ROUTING_APP from $fromId")
868870
// We always send ACKs to other apps, because they might care about the
869871
// messages they sent
870872
shouldBroadcast = true
@@ -879,24 +881,28 @@ class MeshService : Service() {
879881
}
880882

881883
Portnums.PortNum.ADMIN_APP_VALUE -> {
884+
Timber.d("Received ADMIN_APP from $fromId")
882885
val u = AdminProtos.AdminMessage.parseFrom(data.payload)
883886
handleReceivedAdmin(packet.from, u)
884887
shouldBroadcast = false
885888
}
886889

887890
Portnums.PortNum.PAXCOUNTER_APP_VALUE -> {
891+
Timber.d("Received PAXCOUNTER_APP from $fromId")
888892
val p = PaxcountProtos.Paxcount.parseFrom(data.payload)
889893
handleReceivedPaxcounter(packet.from, p)
890894
shouldBroadcast = false
891895
}
892896

893897
Portnums.PortNum.STORE_FORWARD_APP_VALUE -> {
898+
Timber.d("Received STORE_FORWARD_APP from $fromId")
894899
val u = StoreAndForwardProtos.StoreAndForward.parseFrom(data.payload)
895900
handleReceivedStoreAndForward(dataPacket, u)
896901
shouldBroadcast = false
897902
}
898903

899904
Portnums.PortNum.RANGE_TEST_APP_VALUE -> {
905+
Timber.d("Received RANGE_TEST_APP from $fromId")
900906
if (!moduleConfig.rangeTest.enabled) return
901907
val u = dataPacket.copy(dataType = Portnums.PortNum.TEXT_MESSAGE_APP_VALUE)
902908
rememberDataPacket(u)
@@ -927,7 +933,7 @@ class MeshService : Service() {
927933
}
928934
}
929935

930-
else -> Timber.d("No custom processing needed for ${data.portnumValue}")
936+
else -> Timber.d("No custom processing needed for ${data.portnumValue} from $fromId")
931937
}
932938

933939
// We always tell other apps when new data packets arrive
@@ -1604,11 +1610,8 @@ class MeshService : Service() {
16041610
try {
16051611
val proto = MeshProtos.FromRadio.parseFrom(bytes)
16061612
if (proto.payloadVariantCase == PayloadVariantCase.PAYLOADVARIANT_NOT_SET) {
1607-
Timber.w(
1608-
"Received FromRadio with PAYLOADVARIANT_NOT_SET. rawBytes=${bytes.joinToString(",") { b ->
1609-
String.format("0x%02x", b)
1610-
}} proto=$proto",
1611-
)
1613+
val formattedBytes = bytes.joinToString(",") { byte -> String.format(Locale.US, "0x%02x", byte) }
1614+
Timber.w("Received FromRadio with PAYLOADVARIANT_NOT_SET. rawBytes=$formattedBytes proto=$proto")
16121615
}
16131616
proto.route()
16141617
} catch (ex: InvalidProtocolBufferException) {
@@ -1955,7 +1958,10 @@ class MeshService : Service() {
19551958

19561959
private fun handleConfigComplete(configCompleteId: Int) {
19571960
Timber.d(
1958-
"handleConfigComplete called with id=$configCompleteId, configOnly=$configOnlyNonce, nodeInfo=$nodeInfoNonce",
1961+
"handleConfigComplete id=%d configOnly=%d nodeInfo=%d",
1962+
configCompleteId,
1963+
configOnlyNonce,
1964+
nodeInfoNonce,
19591965
)
19601966
when (configCompleteId) {
19611967
configOnlyNonce -> handleConfigOnlyComplete()

0 commit comments

Comments
 (0)