Skip to content

WiP: Instantiate multiple devices of same type

This is part of the !338 MR, focusing on the multiple instantiation of devices. I'm attempting to split that large MR into smaller parts.

Now, the main iio-sensor-proxy app opens all sensors for each type of device for potential future use. For example, we might need data from both base and display-mounted accelerometers to calculate a hinge angle.

Issue #321 provides another example of multiple device usage.

This PR only adds the instantiation of all devices, but data from non-default devices is currently ignored.

Questions:

  • How to instantiate needed drivers only, and not all?
  • Should we move code common to all accelerometers (like getting a location) to a separate common file? This might be tricky due to the private, driver-specific DrvData structure.
  • write some tests and fix the existing ones.
Edited by Yauhen Kharuzhy

Merge request reports

Loading