mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Fix TPS display for devices with >1 tracker (#657)
This commit is contained in:
@@ -291,11 +291,9 @@ export function TrackersTable({
|
||||
{column({
|
||||
id: DisplayColumn.TPS,
|
||||
label: l10n.getString('tracker-table-column-tps'),
|
||||
row: ({ device }) => (
|
||||
row: ({ tracker }) => (
|
||||
<Typography color={fontColor}>
|
||||
{(device?.hardwareStatus?.tps != null && (
|
||||
<>{device.hardwareStatus.tps || 0}</>
|
||||
)) || <></>}
|
||||
{tracker?.tps != null ? <>{tracker.tps}</> : <></>}
|
||||
</Typography>
|
||||
),
|
||||
})}
|
||||
|
||||
@@ -16,6 +16,7 @@ export function useDataFeedConfig() {
|
||||
trackerData.linearAcceleration = true;
|
||||
trackerData.rotationReferenceAdjusted = true;
|
||||
trackerData.rotationIdentityAdjusted = true;
|
||||
trackerData.tps = true;
|
||||
|
||||
const dataMask = new DeviceDataMaskT();
|
||||
dataMask.deviceData = true;
|
||||
|
||||
@@ -201,6 +201,9 @@ public class DataFeedBuilder {
|
||||
TrackerData.addRotationIdentityAdjusted(fbb, createQuat(fbb, quaternion));
|
||||
}
|
||||
}
|
||||
if (mask.getTps() && tracker instanceof TrackerWithTPS trackerWithTps) {
|
||||
TrackerData.addTps(fbb, (int) trackerWithTps.getTPS());
|
||||
}
|
||||
|
||||
return TrackerData.endTrackerData(fbb);
|
||||
}
|
||||
@@ -252,9 +255,6 @@ public class DataFeedBuilder {
|
||||
HardwareStatus.startHardwareStatus(fbb);
|
||||
HardwareStatus.addErrorStatus(fbb, tracker.getStatus().id);
|
||||
|
||||
if (tracker instanceof TrackerWithTPS)
|
||||
HardwareStatus.addTps(fbb, (int) ((TrackerWithTPS) tracker).getTPS());
|
||||
|
||||
if (tracker instanceof TrackerWithBattery twb) {
|
||||
HardwareStatus.addBatteryVoltage(fbb, twb.getBatteryVoltage());
|
||||
HardwareStatus.addBatteryPctEstimate(fbb, (int) twb.getBatteryLevel());
|
||||
|
||||
Submodule solarxr-protocol updated: 7fed7a87c5...f615e9a331
Reference in New Issue
Block a user