You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In rare occasions, libsurvive (running api_example.c) stops working in survive_disambiguator::handle_lightcap if _le->length == 0. I get this more often, when i move a controller while libsurvive is in the early initialization phase.
Data
I'll provide a console log with the code shown below with the failing event highlighted by sunflowers :) . If desired, i can put together a recording soon.
Hardware setup
HTC Vive Lighthouse generation 2
HTC Vive Controller
HTC Vive dongle attached to a USB hub
Desktop (please complete the following information):
Fedora 40, Wayland, KDE spin
Additional context
I am still getting into the realm of how the lightcap logics work. Any help is appreciated. From what i understand, not all kinds of lightcap signals are understood. From the context of handle_lightcap i got that the return value (bool) indicates success, so i put together a workaround as it seems that libsurvive can still go on with this errorneous LightcapElement once in a while. Here is my code for src/survive_disambiguator.c, modified from the current master:
boolhandle_lightcap(SurviveObject*so, constLightcapElement*_le) {
// Gen2 devices can trigger this on startup; but later packets should// reliably change to lh_version == 1. If we see 50+ lightcap packets// without these gen2 packets we can just call it for gen1.SurviveContext*ctx=so->ctx;
// this assert sometimes breaks the whole program, so instead just return success = false and go on// assert(_le->length > 0);uint16_tle_length=_le->length;
if (le_length==0 ) {
SV_WARN("LightcapElement has zero length [SensorId:%d] [Timestamp:%04hX]", _le->sensor_id, _le->timestamp)
return false;
}
if (so->ctx->lh_version==-1) {
disambiguate_version*dv=so->disambiguator_data;
if (dv==0) {
so->disambiguator_data=dv=SV_NEW(disambiguate_version);
}
dv->total_count++;
// SurviveContext *ctx = so->ctx; // moved up for SV_WARN
The text was updated successfully, but these errors were encountered:
Describe the bug
In rare occasions, libsurvive (running
api_example.c
) stops working insurvive_disambiguator::handle_lightcap
if_le->length == 0
. I get this more often, when i move a controller while libsurvive is in the early initialization phase.Data
I'll provide a console log with the code shown below with the failing event highlighted by sunflowers :) . If desired, i can put together a recording soon.
Hardware setup
HTC Vive Lighthouse generation 2
HTC Vive Controller
HTC Vive dongle attached to a USB hub
Desktop (please complete the following information):
Fedora 40, Wayland, KDE spin
Additional context
I am still getting into the realm of how the lightcap logics work. Any help is appreciated. From what i understand, not all kinds of lightcap signals are understood. From the context of
handle_lightcap
i got that the return value (bool) indicates success, so i put together a workaround as it seems that libsurvive can still go on with this errorneousLightcapElement
once in a while. Here is my code forsrc/survive_disambiguator.c
, modified from the current master:The text was updated successfully, but these errors were encountered: