Skip to content

INDI Devices Handling Refactor

Jasem Mutlaq requested to merge (removed):indi_devices_work into master

This is a major refactor for how KStars handles INDI devices. Traditionally, Ekos would create devices as soon as they are received. Each device is assigned a specific device type based on signature properties that belong to that device class. For example, EQUATORIAL_EOD_COORD would indicate that the device is a mount, and so forth. While this scheme worked well for most simple devices, it became complex to handle INDI devices with multiple interfaces (e.g. CCD with Filter wheel built in).

These kind of devices were supported by retaining them as GenericDevices and then sending general INDI commands to them when needed. Using this, we were able to support most multi-interface devices for many years in KStars. However, with even more complex devices that are not conventional (e.g. Dome with weather station interface), it became very complicated to handle such devices effectively without ugly hacks.

This MR introduces an update method for dealing with INDI devices:

  1. All devices are created as GenericDevices
  2. Based on device DriverInterface property, we create ConcreteDevices accordingly. A concrete device is derived from each supported INDI device interface (i.e. Guider, Focuser, Correlator, ...etc)
  3. ConcreteDevices are only announced when READY. This is in contrast to previous behavior when devices were announced as soon as a signature property is detected. We determine if a device ready by monitoring the flow of defined properties using a timer. This results in highly simplified method for dealing with device properties.

Lots of testing is required now to ensure the new scheme works.

Edited by Jasem Mutlaq

Merge request reports

Loading