diff --git a/indi-gpio/indi_gpio.cpp b/indi-gpio/indi_gpio.cpp index d77fd62a0..2950060b7 100644 --- a/indi-gpio/indi_gpio.cpp +++ b/indi-gpio/indi_gpio.cpp @@ -330,3 +330,33 @@ void INDIGPIO::TimerHit() SetTimer(getPollingPeriod()); } + +//////////////////////////////////////////////////////////////////////////////////////// +/// +//////////////////////////////////////////////////////////////////////////////////////// +bool INDIGPIO::ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) +{ + if (dev && !strcmp(dev, getDeviceName())) + { + if (INDI::OutputInterface::processSwitch(dev, name, states, names, n)) + return true; + } + + return INDI::DefaultDevice::ISNewSwitch(dev, name, states, names, n); +} + +//////////////////////////////////////////////////////////////////////////////////////// +/// +//////////////////////////////////////////////////////////////////////////////////////// +bool INDIGPIO::ISNewText(const char * dev, const char * name, char * texts[], char * names[], int n) +{ + if (dev && !strcmp(dev, getDeviceName())) + { + if (INDI::InputInterface::processText(dev, name, texts, names, n)) + return true; + if (INDI::OutputInterface::processText(dev, name, texts, names, n)) + return true; + } + + return INDI::DefaultDevice::ISNewText(dev, name, texts, names, n); +} diff --git a/indi-gpio/indi_gpio.h b/indi-gpio/indi_gpio.h index 18e054840..65fefb04d 100644 --- a/indi-gpio/indi_gpio.h +++ b/indi-gpio/indi_gpio.h @@ -35,6 +35,9 @@ class INDIGPIO : public INDI::DefaultDevice, public INDI::InputInterface, public virtual bool updateProperties() override; virtual void ISGetProperties(const char *dev); + virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override; + virtual bool ISNewText(const char * dev, const char * name, char * texts[], char * names[], int n) override; + protected: /**