mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-13 01:05:55 -04:00
refactor: remove getPacketId() from public interface
- Remove getPacketId() from MessageSender interface (SDK owns packet IDs) - Remove requestId parameter from requestTraceroute/requestNeighborInfo - Make getPacketId() private in SdkRadioController (still used internally for delivery tracking correlation) - Replace radioController.getPacketId() in map with local Random.nextInt() for waypoint ID generation (only needs uniqueness, not SDK correlation) - Remove messageSender dependency from CommonNodeRequestActions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -318,7 +318,7 @@ class SdkRadioController(
|
||||
c.requestNodeInfo(NodeId(destNum))
|
||||
}
|
||||
|
||||
override suspend fun requestTraceroute(requestId: Int, destNum: Int) {
|
||||
override suspend fun requestTraceroute(destNum: Int) {
|
||||
val c = requireClient()
|
||||
c.routing.traceRoute(NodeId(destNum))
|
||||
}
|
||||
@@ -338,7 +338,7 @@ class SdkRadioController(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun requestNeighborInfo(requestId: Int, destNum: Int) {
|
||||
override suspend fun requestNeighborInfo(destNum: Int) {
|
||||
val c = requireClient()
|
||||
c.routing.requestNeighborInfo(NodeId(destNum))
|
||||
}
|
||||
@@ -381,7 +381,7 @@ class SdkRadioController(
|
||||
|
||||
// ── Utility ─────────────────────────────────────────────────────────────
|
||||
|
||||
override fun getPacketId(): Int = packetIdCounter.getAndIncrement()
|
||||
private fun getPacketId(): Int = packetIdCounter.getAndIncrement()
|
||||
|
||||
override fun startProvideLocation() {
|
||||
// Location provision is managed at the app level; no-op here
|
||||
|
||||
Reference in New Issue
Block a user