Monado OpenXR Runtime
Loading...
Searching...
No Matches
led_sync_internal.h File Reference

Internal routines for LED sync code. More...

Include dependency graph for led_sync_internal.h:

Go to the source code of this file.

Macros

#define LOG_TRACE(refinement, ...)   U_LOG_IFL_T(refinement->log_level, __VA_ARGS__)
 
#define LOG_DEBUG(refinement, ...)   U_LOG_IFL_D(refinement->log_level, __VA_ARGS__)
 
#define LOG_INFO(refinement, ...)   U_LOG_IFL_I(refinement->log_level, __VA_ARGS__)
 
#define LOG_WARN(refinement, ...)   U_LOG_IFL_W(refinement->log_level, __VA_ARGS__)
 
#define LOG_ERROR(refinement, ...)   U_LOG_IFL_E(refinement->log_level, __VA_ARGS__)
 
#define MAX_SAMPLE_LATENCY   3
 The amount of frames to not see it for consider a device "not found" during an active search.
 

Functions

static bool phase_uses_led_selection (enum t_led_sync_phase phase)
 
static double frame_period_ns (struct t_led_sync_refinement *refinement)
 The best frame period estimate, falling back to the per-frame interval until there is a long-run one.
 
static time_duration_ns model_clock_offset_ns (struct t_led_sync_refinement *refinement, time_duration_ns clock_offset_ns)
 The host->device offset to publish, corrected by the LEDs' offset from the exposure so it follows the camera.
 
static time_duration_ns max_right_edge (struct t_led_sync_refinement *refinement)
 
static void set_offset_duration_pssense (struct t_led_sync_refinement *refinement, time_duration_ns clock_offset_ns, time_duration_ns fudge_offset_ns, time_duration_ns blink_duration_ns, enum t_led_sync_sample_pssense_mode pssense_mode, const struct t_led_sync_sample_pssense_data pssense_data)
 
static void set_offset_duration (struct t_led_sync_refinement *refinement, time_duration_ns clock_offset_ns, time_duration_ns fudge_offset_ns, time_duration_ns blink_duration_ns)
 
static void set_centered_duration_from_binary_search (struct t_led_sync_refinement *refinement, time_duration_ns blink_duration_ns)
 
static void set_pssense_mode (struct t_led_sync_refinement *refinement, enum t_led_sync_sample_pssense_mode mode, uint8_t leds[4])
 
static XRT_CHECK_RESULT bool advance_clock_offset_pssense_locked (struct t_led_sync_refinement *refinement, time_duration_ns offset_ns)
 
static void set_phase_locked (struct t_led_sync_refinement *refinement, enum t_led_sync_phase new_phase)
 

Detailed Description

Internal routines for LED sync code.

Author
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Macro Definition Documentation

◆ MAX_SAMPLE_LATENCY

#define MAX_SAMPLE_LATENCY   3

The amount of frames to not see it for consider a device "not found" during an active search.

Function Documentation

◆ frame_period_ns()

static double frame_period_ns ( struct t_led_sync_refinement *  refinement)
static

The best frame period estimate, falling back to the per-frame interval until there is a long-run one.

References t_led_sync_refinement::exposure_interval_ns, and t_led_sync_period_estimate::period_ns.

◆ model_clock_offset_ns()

static time_duration_ns model_clock_offset_ns ( struct t_led_sync_refinement *  refinement,
time_duration_ns  clock_offset_ns 
)
static

The host->device offset to publish, corrected by the LEDs' offset from the exposure so it follows the camera.

References t_led_sync_delta_sync::led_error_ns.

Referenced by bg_model_stale().