Add network protocol version (#972)

This commit is contained in:
Uriel authored and GitHub committed 2024-03-31 21:04:28 +03:00
1 parent 8a88721924
commit fc5f3c1a35
6 files changed
+18 -7

No files matched your search

+2 -1
View File
@@ -177,6 +177,7 @@ tracker-infos-hardware_rev = Hardware Revision
tracker-infos-hardware_identifier = Hardware ID
tracker-infos-imu = IMU Sensor
tracker-infos-board_type = Main board
tracker-infos-network_version = Protocol Version
## Tracker settings
tracker-settings-back = Go back to trackers list
@@ -290,7 +291,7 @@ settings-general-steamvr-trackers-hands = Hands
settings-general-steamvr-trackers-tracker_toggling = Automatic tracker assignment
settings-general-steamvr-trackers-tracker_toggling-description = Automatically handles toggling SteamVR trackers on or off depending on your current tracker assignments
settings-general-steamvr-trackers-tracker_toggling-label = Automatic tracker assignment
settings-general-steamvr-trackers-hands-warning = <b>Warning:</b> hand trackers will override your controllers.
settings-general-steamvr-trackers-hands-warning = <b>Warning:</b> hand trackers will override your controllers.
Are you sure?
settings-general-steamvr-trackers-hands-warning-cancel = Cancel
settings-general-steamvr-trackers-hands-warning-done = Yes
@@ -275,6 +275,14 @@ export function TrackerSettingsPage() {
{tracker?.device?.hardwareInfo?.boardType || '--'}
</Typography>
</div>
<div className="flex justify-between">
<Typography color="secondary">
{l10n.getString('tracker-infos-network_version')}
</Typography>
<Typography>
{tracker?.device?.hardwareInfo?.networkProtocolVersion || '--'}
</Typography>
</div>
</div>
{tracker?.tracker && (
<IMUVisualizerWidget
@@ -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]
}