auto wivrn_hmd_get_battery_status

This commit is contained in:
Patrick Nicolas committed 2025-03-02 20:34:32 +01:00
1 parent 098642bcc5
commit e86ebfdadd
2 files changed
+3 -18

No files matched your search

+2 -16
View File
@@ -41,11 +41,6 @@ namespace wivrn
static void wivrn_hmd_destroy(xrt_device * xdev);
static xrt_result_t wivrn_hmd_get_battery_status(struct xrt_device * xdev,
bool * out_present,
bool * out_charging,
float * out_charge);
static double foveate(double a, double b, double λ, double c, double x)
{
// In order to save encoding, transmit and decoding time, only a portion of the image is encoded in full resolution.
@@ -206,7 +201,7 @@ wivrn_hmd::wivrn_hmd(wivrn::wivrn_session * cnx,
base->update_inputs = [](xrt_device *) { return XRT_SUCCESS; };
base->get_tracked_pose = method_pointer<&wivrn_hmd::get_tracked_pose>;
base->get_view_poses = method_pointer<&wivrn_hmd::get_view_poses>;
base->get_battery_status = wivrn_hmd_get_battery_status;
base->get_battery_status = method_pointer<&wivrn_hmd::get_battery_status>;
base->get_visibility_mask = get_visibility_mask;
base->destroy = wivrn_hmd_destroy;
name = XRT_DEVICE_GENERIC_HMD;
@@ -322,8 +317,7 @@ void wivrn_hmd::get_view_poses(const xrt_vec3 * default_eye_relation,
}
}
xrt_result_t wivrn_hmd::get_battery_status(struct xrt_device * xdev,
bool * out_present,
xrt_result_t wivrn_hmd::get_battery_status(bool * out_present,
bool * out_charging,
float * out_charge)
{
@@ -427,12 +421,4 @@ static void wivrn_hmd_destroy(xrt_device * xdev)
{
static_cast<wivrn_hmd *>(xdev)->unregister();
}
static xrt_result_t wivrn_hmd_get_battery_status(struct xrt_device * xdev,
bool * out_present,
bool * out_charging,
float * out_charge)
{
return static_cast<wivrn_hmd *>(xdev)->get_battery_status(xdev, out_present, out_charging, out_charge);
}
} // namespace wivrn
+1 -2
View File
@@ -75,8 +75,7 @@ public:
xrt_space_relation * out_head_relation,
xrt_fov * out_fovs,
xrt_pose * out_poses);
xrt_result_t get_battery_status(struct xrt_device * xdev,
bool * out_present,
xrt_result_t get_battery_status(bool * out_present,
bool * out_charging,
float * out_charge);