×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

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
 
2 years 7 months ago #74618

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

  • Posts: 39
  • Thank you received: 9
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
2 years 6 months ago #75065

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

Time to create page: 4.602 seconds