×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Change UISwitchVector label

  • Posts: 11
  • Thank you received: 0
Hi,

I want to develop an improved version for the DragonFly controller, so that I can send a pulse to open and close the roof when that dragonfly relay is configured to send a pulse. Now it only opens the relay until the sensor is closed, which no works in all scenarios.

I am getting the data from each relay correctly, but now I want to change the label of each relay, so instead to show "Relay #1", the driver shows "Lights", for example. But I'm not able to change the layer of the switch vector, in this page seems that there's a function to change the label 
www.indilib.org/api/structINDI_1_1Widget...bbf13508c3274ec66e52

error: no member named 'setLabel' in '_ISwitchVectorProperty'                    
Relays->getRelaySP()->setLabel("d");                     

can anyone give me some indications?

thanks
 
1 year 3 months ago #74618

Please Log in or Create an account to join the conversation.

  • Posts: 34
  • Thank you received: 8
Hi,

Radek did the same thing inside its "Astroberry-DIY" drivers collection. You can find it here: github.com/rkaczorek/astroberry-diy and look in astroberry_relays .h and .cpp.
Hope this helps.

Regards
1 year 3 months ago #75065

Please Log in or Create an account to join the conversation.

Time to create page: 0.468 seconds