mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 03:46:28 -08:00
Add network protocol version (#972)
This commit is contained in:
1 parent
8a88721924
commit
fc5f3c1a35
6 files changed
+18
-7
No files matched your search
@@ -58,6 +58,8 @@ public class DataFeedBuilder {
|
||||
ByteBuffer.wrap(address).getInt()
|
||||
)
|
||||
);
|
||||
|
||||
HardwareInfo.addNetworkProtocolVersion(fbb, udpDevice.firmwareBuild);
|
||||
}
|
||||
|
||||
// BRUH MOMENT
|
||||
|
||||
@@ -79,6 +79,7 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
|
||||
name = handshake.macString?.let { "udp://$it" }
|
||||
descriptiveName = "udp:/$addr"
|
||||
firmwareBuild = handshake.firmwareBuild
|
||||
firmwareVersion = handshake.firmware
|
||||
connectionsByAddress[address] = this
|
||||
|
||||
val i = connections.indexOf(this)
|
||||
@@ -102,6 +103,7 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
|
||||
?: "udp:/$addr"
|
||||
descriptiveName = "udp:/$addr"
|
||||
firmwareBuild = handshake.firmwareBuild
|
||||
firmwareVersion = handshake.firmware
|
||||
val i = connections.indexOf(this)
|
||||
LogManager
|
||||
.info(
|
||||
@@ -140,6 +142,7 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
|
||||
// string it just looks like "/address" lol.
|
||||
// Fixing this would break config!
|
||||
connection.descriptiveName = "udp:/$addr"
|
||||
connection.firmwareVersion = handshake.firmware
|
||||
synchronized(connections) {
|
||||
// Register the new connection
|
||||
val i = connections.size
|
||||
|
||||
@@ -68,11 +68,8 @@ class UDPDevice(
|
||||
set(manufacturer) {
|
||||
super.manufacturer = manufacturer
|
||||
}
|
||||
override var firmwareVersion: String?
|
||||
get() = "v$firmwareBuild"
|
||||
set(firmwareVersion) {
|
||||
super.firmwareVersion = firmwareVersion
|
||||
}
|
||||
override var firmwareVersion: String? = null
|
||||
get() = field?.let { "v$it" }
|
||||
|
||||
fun getTracker(id: Int): Tracker? = trackers[id]
|
||||
}
|
||||
Reference in new issue
Block a user