···11+ipc: Add functionality to disable a device input via the `monado-ctl` utility,
22+this allows us to pass the conformance tests that requires the runtime to turn
33+off a device.
+5
src/xrt/include/xrt/xrt_results.h
···3131 * Could not allocate native image buffer(s).
3232 */
3333 XRT_ERROR_ALLOCATION = -7,
3434+ /*
3535+ * The pose is no longer active, this happens when the application
3636+ * tries to access a pose that is no longer active.
3737+ */
3838+ XRT_ERROR_POSE_NOT_ACTIVE = -8,
3439} xrt_result_t;
+11-11
src/xrt/ipc/ipc_client_device.c
···139139{
140140 // Helpers.
141141 struct ipc_shared_memory *ism = ipc_c->ism;
142142- struct ipc_shared_device *idev = &ism->idevs[device_id];
142142+ struct ipc_shared_device *isdev = &ism->isdevs[device_id];
143143144144 // Allocate and setup the basics.
145145 enum u_device_alloc_flags flags =
···153153 icd->base.set_output = ipc_client_device_set_output;
154154 icd->base.destroy = ipc_client_device_destroy;
155155156156- // Start copying the information from the idev.
156156+ // Start copying the information from the isdev.
157157 icd->base.tracking_origin = xtrack;
158158- icd->base.name = idev->name;
158158+ icd->base.name = isdev->name;
159159 icd->device_id = device_id;
160160161161 // Print name.
162162- snprintf(icd->base.str, XRT_DEVICE_NAME_LEN, "%s", idev->str);
162162+ snprintf(icd->base.str, XRT_DEVICE_NAME_LEN, "%s", isdev->str);
163163164164 // Setup inputs, by pointing directly to the shared memory.
165165- assert(idev->num_inputs > 0);
166166- icd->base.inputs = &ism->inputs[idev->first_input_index];
167167- icd->base.num_inputs = idev->num_inputs;
165165+ assert(isdev->num_inputs > 0);
166166+ icd->base.inputs = &ism->inputs[isdev->first_input_index];
167167+ icd->base.num_inputs = isdev->num_inputs;
168168169169 // Setup outputs, if any point directly into the shared memory.
170170- icd->base.num_outputs = idev->num_outputs;
171171- if (idev->num_outputs > 0) {
172172- icd->base.outputs = &ism->outputs[idev->first_output_index];
170170+ icd->base.num_outputs = isdev->num_outputs;
171171+ if (isdev->num_outputs > 0) {
172172+ icd->base.outputs = &ism->outputs[isdev->first_output_index];
173173 } else {
174174 icd->base.outputs = NULL;
175175 }
···178178 u_var_add_root(icd, icd->base.str, true);
179179 u_var_add_ro_u32(icd, &icd->device_id, "device_id");
180180181181- icd->base.device_type = idev->device_type;
181181+ icd->base.device_type = isdev->device_type;
182182 return &icd->base;
183183}