From cc62bfcddcf5f679ce1bb038962037669e49f395 Mon Sep 17 00:00:00 2001 From: Caden Gobat <36030084+cgobat@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:26:28 -0700 Subject: [PATCH 1/4] Fix a typo --- pyindi/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyindi/device.py b/pyindi/device.py index fa3c6e1..9134ede 100644 --- a/pyindi/device.py +++ b/pyindi/device.py @@ -104,7 +104,7 @@ async def drain(self): class INDIEnumMember(int): """ ## INDIEnumMember - This sublcasses the int class to match + This subclasses the int class to match the standard enum int type but adds a string in the assignment to allow for comparison with the raw xml From 9a1dcd5b6786c4e4133879bfd56c34f001e69f93 Mon Sep 17 00:00:00 2001 From: Caden Gobat <36030084+cgobat@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:26:50 -0700 Subject: [PATCH 2/4] Remove some extra whitespace --- pyindi/device.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyindi/device.py b/pyindi/device.py index 9134ede..026ab3c 100644 --- a/pyindi/device.py +++ b/pyindi/device.py @@ -59,9 +59,6 @@ async def stdio(limit=asyncio.streams._DEFAULT_LIMIT): return reader, writer - - - def printa(msg: Union[str, bytes]): """ This was the old way of writing to stdout From bcc1575f0d39a1847e783f696874a933b14636aa Mon Sep 17 00:00:00 2001 From: Caden Gobat <36030084+cgobat@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:27:48 -0700 Subject: [PATCH 3/4] Add DRIVER_INTERFACE enumeration Ref https://docs.indilib.org/drivers/basics/driver-interface.html --- pyindi/device.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pyindi/device.py b/pyindi/device.py index 026ab3c..2eede8f 100644 --- a/pyindi/device.py +++ b/pyindi/device.py @@ -217,6 +217,37 @@ def fromstring(string): raise ValueError(f"ISState must be either Off or On not {string}") +class DRIVER_INTERFACE(Enum): + """Driver interface enum. + + Used by drivers to advertise to clients which interface(s) they implement. + + See https://docs.indilib.org/drivers/basics/driver-interface.html for details. + """ + + GENERAL_INTERFACE = 0 # Default interface for all INDI devices + TELESCOPE_INTERFACE = 1 << 0 # Telescope interface + CCD_INTERFACE = 1 << 1 # CCD interface + GUIDER_INTERFACE = 1 << 2 # Guider interface + FOCUSER_INTERFACE = 1 << 3 # Focuser interface + FILTER_INTERFACE = 1 << 4 # Filter interface + DOME_INTERFACE = 1 << 5 # Dome interface + GPS_INTERFACE = 1 << 6 # GPS interface + WEATHER_INTERFACE = 1 << 7 # Weather interface, + AO_INTERFACE = 1 << 8 # Adaptive Optics Interface + DUSTCAP_INTERFACE = 1 << 9 # Dust Cap Interface + LIGHTBOX_INTERFACE = 1 << 10 # Light Box Interface + DETECTOR_INTERFACE = 1 << 11 # Detector interface + ROTATOR_INTERFACE = 1 << 12 # Rotator interface + SPECTROGRAPH_INTERFACE = 1 << 13 # Spectrograph interface + CORRELATOR_INTERFACE = 1 << 14 # Correlators (interferometers) interface + AUX_INTERFACE = 1 << 15 # Auxiliary interface + OUTPUT_INTERFACE = 1 << 16 # Digital Output (e.g. Relay) interface + INPUT_INTERFACE = 1 << 17 # Digital/Analog Input (e.g. GPIO) interface + POWER_INTERFACE = 1 << 18 # Auxiliary interface + SENSOR_INTERFACE = SPECTROGRAPH_INTERFACE | DETECTOR_INTERFACE | CORRELATOR_INTERFACE + + class IVectorProperty(ABC): """ INDI Vector asbstractions From dcb2c9d421eb2f92eecde0f57d11ef0717dc55d4 Mon Sep 17 00:00:00 2001 From: Caden Gobat <36030084+cgobat@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:35:59 -0700 Subject: [PATCH 4/4] Fix POWER_INTERFACE comment (this was wrong in the source material/docs) --- pyindi/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyindi/device.py b/pyindi/device.py index 2eede8f..d59921a 100644 --- a/pyindi/device.py +++ b/pyindi/device.py @@ -244,7 +244,7 @@ class DRIVER_INTERFACE(Enum): AUX_INTERFACE = 1 << 15 # Auxiliary interface OUTPUT_INTERFACE = 1 << 16 # Digital Output (e.g. Relay) interface INPUT_INTERFACE = 1 << 17 # Digital/Analog Input (e.g. GPIO) interface - POWER_INTERFACE = 1 << 18 # Auxiliary interface + POWER_INTERFACE = 1 << 18 # Power interface SENSOR_INTERFACE = SPECTROGRAPH_INTERFACE | DETECTOR_INTERFACE | CORRELATOR_INTERFACE