Skip to content

Commit

Permalink
fix: Fallback to GET_ALL_DATA if the version info is incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Aug 7, 2024
1 parent a86c273 commit 58a8ae6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ private void OnVersionInfoResponse(object? sender, DebugModeVersionDecoder e)
HwVersion = $"{Strings.Left}: {e.LeftHardwareVersion ?? Unknown}, {Strings.Right}: {e.RightHardwareVersion ?? Unknown}";
SwVersion = $"{Strings.Left}: {e.LeftSoftwareVersion ?? Unknown}, {Strings.Right}: {e.RightSoftwareVersion ?? Unknown}";
TouchSwVersion = $"{Strings.Left}: {e.LeftTouchSoftwareVersion ?? Unknown}, {Strings.Right}: {e.RightTouchSoftwareVersion ?? Unknown}";

// Fallback to GET_ALL_DATA if the version info is incomplete
if(e is { LeftTouchSoftwareVersion: "0", RightTouchSoftwareVersion: "0" })
TouchSwVersion = DeviceMessageCache.Instance.DebugGetAllData?.TouchSoftwareVersion ?? Unknown;
if(e is { LeftHardwareVersion: "rev0.0", RightHardwareVersion: "rev0.0" })
HwVersion = DeviceMessageCache.Instance.DebugGetAllData?.HardwareVersion ?? Unknown;
}

private void OnDebugSerialNumberReceived(object? sender, CradleSerialNumberDecoder e)
Expand Down

0 comments on commit 58a8ae6

Please sign in to comment.