Skip to content

Commit ff0d823

Browse files
committed
Merge remote-tracking branch 'upstream/main' into runtime
2 parents 2e8bfa5 + 9a27fb1 commit ff0d823

File tree

6 files changed

+24
-4
lines changed

6 files changed

+24
-4
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/pnpm-workspace.yaml @loucass003
1111

1212
# loucass003 and Erimel responsible for i18n
13-
/gui/public/i18n/ @loucass003 @Erimelowo
13+
/gui/public/i18n/ @loucass003 @Erimelowo @ImSapphire
1414
/gui/src/i18n/ @loucass003 @Erimelowo
1515
/l10n.toml @loucass003 @Erimelowo
1616

gui/public/i18n/en/translation.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ tracker-settings-update = Update now
407407
tracker-settings-update-title = Firmware version
408408
tracker-settings-current-version = Current
409409
tracker-settings-latest-version = Latest
410+
tracker-settings-build-date = Build Date
410411
411412
412413
## Tracker part card info

gui/src/components/tracker/TrackerSettings.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ export function TrackerSettingsPage() {
208208
Firmware version
209209
</Typography>
210210
<div className="flex gap-2 flex-col">
211+
<div className="flex justify-between gap-2">
212+
<Typography id="tracker-settings-build-date" />
213+
<Typography
214+
whitespace="whitespace-pre-wrap"
215+
textAlign="text-end"
216+
>
217+
{tracker?.device?.hardwareInfo?.firmwareDate || '--'}
218+
</Typography>
219+
</div>
211220
<div className="flex justify-between gap-2">
212221
<Typography id="tracker-settings-current-version" />
213222
<Typography

server/core/src/main/java/dev/slimevr/protocol/datafeed/DataFeedBuilder.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ public static int createHardwareInfo(FlatBufferBuilder fbb, Device device) {
3939
? fbb.createString(device.getManufacturer())
4040
: 0;
4141

42+
int firmwareDateOffset = device.getFirmwareDate() != null
43+
? fbb.createString(device.getFirmwareDate())
44+
: 0;
45+
4246
int hardwareIdentifierOffset = fbb.createString(device.getHardwareIdentifier());
4347

4448
HardwareInfo.startHardwareInfo(fbb);
4549
HardwareInfo.addFirmwareVersion(fbb, nameOffset);
4650
HardwareInfo.addManufacturer(fbb, manufacturerOffset);
4751
HardwareInfo.addHardwareIdentifier(fbb, hardwareIdentifierOffset);
4852

53+
HardwareInfo.addFirmwareDate(fbb, firmwareDateOffset);
54+
4955
if (device instanceof UDPDevice udpDevice) {
5056
var address = udpDevice.getIpAddress().getAddress();
5157
HardwareInfo
@@ -68,6 +74,7 @@ public static int createHardwareInfo(FlatBufferBuilder fbb, Device device) {
6874

6975
HardwareInfo.addMcuId(fbb, device.getMcuType().getSolarType());
7076
HardwareInfo.addOfficialBoardType(fbb, device.getBoardType().getSolarType());
77+
7178
return HardwareInfo.endHardwareInfo(fbb);
7279
}
7380

server/core/src/main/java/dev/slimevr/tracking/trackers/Device.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ open class Device(val magSupport: Boolean = false) {
1313
open val id: Int = nextLocalDeviceId.incrementAndGet()
1414
open var name: String? = null
1515
open var firmwareVersion: String? = null
16+
open var firmwareDate: String? = null
1617
open var manufacturer: String? = null
1718
open val trackers: MutableMap<Int, Tracker> = ConcurrentHashMap()
1819

server/core/src/main/java/dev/slimevr/tracking/trackers/hid/HIDCommon.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,14 @@ class HIDCommon {
289289
// Nothing to do now..
290290
}
291291
}
292-
if (fw_date != null && fw_major != null && fw_minor != null && fw_patch != null) {
292+
if (fw_date != null) {
293293
val firmwareYear = 2020 + (fw_date shr 9 and 127)
294294
val firmwareMonth = fw_date shr 5 and 15
295295
val firmwareDay = fw_date and 31
296-
val firmwareDate = String.format("%04d-%02d-%02d", firmwareYear, firmwareMonth, firmwareDay)
297-
device.firmwareVersion = "$fw_major.$fw_minor.$fw_patch (Build $firmwareDate)"
296+
device.firmwareDate = String.format("%04d-%02d-%02d", firmwareYear, firmwareMonth, firmwareDay)
297+
}
298+
if (fw_major != null && fw_minor != null && fw_patch != null) {
299+
device.firmwareVersion = "$fw_major.$fw_minor.$fw_patch"
298300
}
299301
if (svr_status != null) {
300302
val status = TrackerStatus.getById(svr_status)

0 commit comments

Comments
 (0)