Skip to content

Commit 3388071

Browse files
Mark Stalzerclaude
authored andcommitted
driver_vive: downgrade unknown lightcap report from error to warning
SV_ERROR with SURVIVE_ERROR_HARWARE_FAULT crashes the process when an unrecognised USB lightcap report ID is received. New tracker firmware routinely emits report IDs that older libsurvive versions do not know; crashing on an unrecognised ID makes libsurvive incompatible with any firmware newer than it was built against. The adjacent VIVE_REPORT_USB_TRACKER_LIGHTCAP_V1 case already uses SV_INFO and ignores the packet. Apply the same treatment to the unknown case: log a warning and continue so tracking on all known report types is unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 08b0d8c commit 3388071

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/driver_vive.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,8 +3109,8 @@ void survive_data_cb_locked(uint64_t time_received_us, SurviveUSBInterface *si)
31093109
} else if (id == VIVE_REPORT_USB_TRACKER_LIGHTCAP_V1) {
31103110
SV_INFO("USB lightcap report is of an unexpected type for %s: %d (0x%02x)", obj->codename, id, id);
31113111
} else {
3112-
SV_ERROR(SURVIVE_ERROR_HARWARE_FAULT, "USB lightcap report is of an unknown type for %s: %d (0x%02x)",
3113-
obj->codename, id, id);
3112+
SV_WARN("USB lightcap report is of an unknown type for %s: %d (0x%02x); ignoring",
3113+
obj->codename, id, id);
31143114
}
31153115

31163116
break;

0 commit comments

Comments
 (0)