Log when unknown input name is requested for generic trackers
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "wivrn_generic_tracker.h"
|
||||
#include "util/u_logging.h"
|
||||
#include "utils/method.h"
|
||||
#include "wivrn_session.h"
|
||||
|
||||
@@ -131,6 +132,20 @@ wivrn_generic_tracker::wivrn_generic_tracker(int index, xrt_device * hmd, wivrn_
|
||||
input_count = 1;
|
||||
}
|
||||
|
||||
#define XRT_INPUT_NAME_CASE(NAME, VALUE) \
|
||||
case VALUE: \
|
||||
return #NAME;
|
||||
|
||||
const char * input_name_str(xrt_input_name name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
XRT_INPUT_LIST(XRT_INPUT_NAME_CASE)
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
xrt_result_t wivrn_generic_tracker::update_inputs()
|
||||
{
|
||||
return XRT_SUCCESS;
|
||||
@@ -147,6 +162,8 @@ xrt_result_t wivrn_generic_tracker::get_tracked_pose(xrt_input_name name, int64_
|
||||
cnx.add_predict_offset(extrapolation_time);
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
U_LOG_D("Unknown input name %s", input_name_str(name));
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user