Commit graph

826 commits

Author SHA1 Message Date
Antonio Ospite a4167ee500 d/ns: silence -Wunused-result warning, close config_file in error paths
On some systems fread() is declared with  attribute warn_unused_result
and this results in a build warning:

-----------------------------------------------------------------------
Building C object src/xrt/drivers/CMakeFiles/drv_ns.dir/north_star/ns_hmd.c.o
.../src/xrt/drivers/north_star/ns_hmd.c: In function ‘ns_config_load’:
.../src/xrt/drivers/north_star/ns_hmd.c:512:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  512 |  fread(json, 1, file_size, config_file);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Explicitly ignore the return value of that fread() to silence the
warning.

And while at it also close config_file in some error paths between
fopen() and fclose() which where leaking the file pointer when jumping
to the parse_error label.
2022-03-09 16:10:43 +01:00
Moses Turner 30b779e515 t/hand: Add ht_sync 2022-03-08 20:44:25 +00:00
Moses Turner a9db1a6f6e d/ht_crtl_emu: Free driver 2022-03-08 13:52:23 -06:00
Jakob Bornecrantz bf1edf96eb d/dai: Add OV7251 sensor info 2022-03-04 14:04:13 +00:00
Henry Che add7b5723f Update illixr_device.cpp: There is no function called get_view_pose in xrt_device.h. 2022-02-23 17:13:38 +00:00
Mateo de Mayo cee1571625 d/euroc: Fix euroc player skip functionality 2022-02-22 22:56:07 +00:00
Mateo de Mayo 4b94d83c11 a/math: Fix one euro implementations not dividing by dt
The dy name was kept. It can now be thought of as "[d]erivative of [y]"
instead of the previous "change of y". Also, the beta parameters of the
one-euro users were adjusted by approximately multiplying them by 0.016
to compensate.
2022-02-22 13:34:45 +00:00
nima01 be3546eb92 d/wmr: Reverb G1: Avoid camera buffer related hangs 2022-02-20 14:57:36 +00:00
Christoph Haag 49b81e219f aux/util: Move fov from u_device_simple_info::views to top level 2022-02-19 13:04:32 +00:00
Christoph Haag 996a5d3e9a xrt: Move fov from xrt_view to xrt_hmd_parts::distortion 2022-02-19 13:04:32 +00:00
Christoph Haag 5e1805f04b build: Add sample driver to meson build 2022-02-19 13:04:32 +00:00
Ryan Pavlik 4ecbcc2d27 d/wmr: Fix doxygen warning 2022-02-19 01:15:36 +00:00
Christoph Haag 5b1d15f143 d/survive: Change license to BSL, as originally intended 2022-02-19 00:55:54 +00:00
Christoph Haag b2e7fc0f11 d/survive: Add pragma once and c++ compatibility 2022-02-19 00:55:54 +00:00
Christoph Haag bab6858eb8 d/multi: Change license to BSL, as originally intended 2022-02-19 00:55:54 +00:00
Christoph Haag 43f0bb4343 xrt: Fix tracking override docs 2022-02-19 00:43:30 +00:00
Nova f2ec7a7dd5 d/survive: Add SURVIVE_DISABLE_HAND_EMULATION env variable 2022-02-17 13:20:59 +00:00
Jakob Bornecrantz 9b656cde77 xrt: Remove xrt_device::get_view_pose
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:24 +00:00
Jakob Bornecrantz 0511b319ba drivers: Implement xrt_device::get_view_poses
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:08 +00:00
Jakob Bornecrantz b322ff689b d/wmr: Add trace markers to some common functions 2022-02-16 22:25:55 +00:00
Jakob Bornecrantz 4aa2ae985c d/wmr: Refactor hololens code a bit 2022-02-16 22:25:55 +00:00
Jakob Bornecrantz 8f5a7b88c7 d/wmr: Tidy todos 2022-02-16 22:25:55 +00:00
Jakob Bornecrantz 7791a04069 d/rs: Add math include to fix build and org includes
Fixes build on Ubuntu 21.10
2022-02-14 14:34:06 +00:00
Mateo de Mayo 3cba6dc700 d/rs: Add exposure controls to the debug UI 2022-02-14 10:22:05 -03:00
nima01 41edf12a0d d/wmr: Debug GUI support for enabling/disabling HMD screen and displaying IPD and proximity values 2022-02-12 03:45:16 +00:00
Moses Turner 7ee8a7dba0 d/dai: add stereo-RGB pipeline behind ifdef, waiting for Luxonis to upstream multicam support 2022-02-10 10:55:06 -06:00
Ryan Pavlik c30acbf9f8 d/ht: Forward declarations and IWYU 2022-02-08 17:27:42 -06:00
Ryan Pavlik 5b8c869b56 d/ht: Fix header and usages of helpers 2022-02-08 17:21:46 -06:00
Ryan Pavlik 8c7af28904 d/ht: Fix build issues against updated history structure. 2022-02-08 16:58:24 -06:00
Ryan Pavlik 65ef8d58f1 d/ht: Cleanup usage of history buffer.
May wish to reconsider whether all these usages are required: they appear to only use the back (latest) element.
2022-02-08 17:00:11 +00:00
Moses Turner 614e0e58ae d/ht: use new HistoryBuf api 2022-02-08 17:00:11 +00:00
Ryan Pavlik d05df584b2 d/ht: Some cleanups 2022-02-08 17:00:11 +00:00
nima01 45466e419b d/wmr: Reverb G1 proximity sensor support 2022-02-02 02:27:55 +01:00
Christoph Haag 2ad634bd1e d/wmr: print json config on debug log level 2022-01-21 20:32:35 +00:00
Christoph Haag 6e339014a5 d/wmr: Add Medion Erazer X1000 2022-01-21 20:32:35 +00:00
Christoph Haag 45adabe135 d/wmr: Clarify comment in headset_map assert 2022-01-21 20:32:35 +00:00
Christoph Haag 88d55c6e22 d/wmr: Sort HP G2 controller PID to the other HP devices 2022-01-21 20:32:35 +00:00
Christoph Haag 96c09e06e7 d/wmr: consolidate interface getters
Moving them into one function makes it simpler to add more HMDs.
2022-01-21 20:32:35 +00:00
Ryan Pavlik c9889f776f xrt: Rename xrt_space_graph to xrt_relation_chain.
Rename all functions and instances accordingly as well,
and add documentation for all methods.
2022-01-21 19:54:30 +00:00
Moses Turner 2188d8afc2 d/remote: expose hand active state to remote gui 2022-01-18 14:33:11 -06:00
Jarvis Huang 52cb2ef123 d/android: Stop thread function when device destoryed 2022-01-05 14:59:39 +00:00
Simon Zeni 8b1d432b79 d/ht_ctrl_emu: fix crash and truncation warning 2021-12-24 15:19:51 -05:00
Mateo de Mayo 88a3848b5a d/wmr: Map wmr_source data to monotonic clock 2021-12-21 11:43:17 +00:00
Mateo de Mayo 74e149159b t/slam: Add SLAM_SUBMIT_FROM_START envvar
Useful for setups that need some tuning to their sensors before sending
data to a SLAM system.
Removes the submit_frames property from wmr_camera as this replaces it.
2021-12-21 11:43:17 +00:00
Mateo de Mayo 1c7323f1c2 d/rs: Generalize laser emitter option setup to any rs option 2021-12-21 11:43:17 +00:00
Mateo de Mayo fa431fc010 d/rs: Map all rs_hdev timestamps to monotonic clock 2021-12-21 11:43:17 +00:00
James Hogan 7ee8d1ac5d
xrt: Revert xrt_view::display::{w|h}_pixels changes
Commit 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
accidentally removed some references to {w|h}_pixels as well as
{w|h}_meters. This resulted in recommended view image sizes of 0px*0px.

Revert those changes without reverting the rest of the commit.

Fixes: 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
2021-12-20 23:00:40 +00:00
Simon Zeni 4e4e6708bc Revert "d/survive: ajust timestamp from button event"
This reverts commit b396c200d0.

The issue has been fixed in libsurvive [1]

[1]: https://github.com/cntools/libsurvive/pull/250
2021-12-17 13:40:53 -05:00
Moses Turner a19f13171b meson: use cjson_include with depthai driver 2021-12-14 14:12:42 +00:00
Christoph Haag b7c8a6faa5 d/ht_ctrl_emu: work around truncation warning
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp: In function ‘int cemu_devices_create(xrt_device*, xrt_device*, xrt_device**)’:
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:102: warning: ‘ Left Hand’ directive output may be truncated writing 10 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                                                                                                      ^~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:35: note: ‘snprintf’ output between 11 and 266 bytes into a destination of size 256
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:84: warning: ‘ Right Hand’ directive output may be truncated writing 11 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                                                                                    ^~~~~~~~~~~
../src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp:439:35: note: ‘snprintf’ output between 12 and 267 bytes into a destination of size 256
  439 |                 int ret = snprintf(cemud[i]->base.str, XRT_DEVICE_NAME_LEN, i ? "%s Right Hand" : "%s Left Hand", hands->str);
      |                           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-12-14 14:58:33 +01:00