diff options
author | cnlohr <lohr85@gmail.com> | 2018-04-25 23:40:13 -0400 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2018-04-25 23:40:13 -0400 |
commit | 5d4f2e2d9eb0548d880b130cc15733662fc57158 (patch) | |
tree | b3fc191ff4a0749a915c4134d3bb27049b2e176d | |
parent | 464b5b045ceb8dab976c0e4232f4112ad0db48bb (diff) | |
download | libsurvive-5d4f2e2d9eb0548d880b130cc15733662fc57158.tar.gz libsurvive-5d4f2e2d9eb0548d880b130cc15733662fc57158.tar.bz2 |
remove printf, process multiple UDP packets per slice.
-rw-r--r-- | src/poser_charlesrefine.c | 1 | ||||
-rw-r--r-- | src/survive_driver_udp.c | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/poser_charlesrefine.c b/src/poser_charlesrefine.c index 5357600..b35a878 100644 --- a/src/poser_charlesrefine.c +++ b/src/poser_charlesrefine.c @@ -350,7 +350,6 @@ int PoserCharlesRefine(SurviveObject *so, PoserData *pd) { // Stage 4: "Tug" on the rotation of the object, from all of the sensor's pov. // If we were able to determine likliehood of a hit in the sweep instead of afterward // we would actually be able to perform this on a per-hit basis. - printf( ":::%d\n", validpoints ); if (validpoints > 1) { LinmathQuat correction; quatcopy(correction, LinmathQuat_Identity); diff --git a/src/survive_driver_udp.c b/src/survive_driver_udp.c index 9c0904a..8000749 100644 --- a/src/survive_driver_udp.c +++ b/src/survive_driver_udp.c @@ -37,6 +37,8 @@ typedef struct SurviveDriverUDP SurviveDriverUDP; static int UDP_poll(struct SurviveContext *ctx, void *_driver) { SurviveDriverUDP *driver = _driver; int cnt; + for( ;; ) + { cnt = recvfrom(driver->sock, (char *) &sendbuf, sizeof(sendbuf), MSG_DONTWAIT | MSG_NOSIGNAL , (struct sockaddr *) &driver->addr, &driver->addrlen); if (cnt < 0) { // perror("recvfrom"); @@ -53,8 +55,7 @@ static int UDP_poll(struct SurviveContext *ctx, void *_driver) { le.length = sendbuf.length_event * 48 / 160; //16 bits le.timestamp = sendbuf.ccount_struc * 48 / 160; //32 bits handle_lightcap(driver->so, &le); - - + } /* To emit an IMU event, send this: |