×

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

Bi-monthly release with minor bug fixes and improvements

Updating switch label and have client see the change

  • Posts: 2
  • Thank you received: 0
Hi all,

We initialize our GUI with some initial filter names and radio buttons are made with the switch labels.

Our GUI allows users to change the filter labels. When that happens, we assign the the switch label with the entered filter label text.
// lfS is the lower filter switch
// lfSP is the lower filter switch vector property
 
strcpy( lfS.label, filter_text );
IDSetSwitch(&lfSP, NULL);

The client does not see this switch label change. The switch label (the user entered filter text) is only updated when the client is disconnected and reconnected.

How can I push this switch label change so the client sees and updates the GUI?

Thanks!
Dan
3 years 6 months ago #60152

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

Unfortunately, the INDI wire protocol does not support this. For this to work, you have to delete the property and redefine it again. You cannot change the label dynamically.
3 years 6 months ago #60156

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

  • Posts: 2
  • Thank you received: 0
Hey Jasem, thanks for the reply. We have a workaround for now (basically refreshing the browser window for our web based GUI).

In the future, do you have recommendations for what property we should use to accomplish our original goal of allowing users to update labels of filters in our control GUIs?

I can think of some workarounds, but I wonder if INDI supports this in any way.
3 years 5 months ago #62006

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

What we did was to define "Filter #1" , "Filter #2" as the labels, and then the text would contain the actual filter designation.
3 years 5 months ago #62019

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

Time to create page: 0.206 seconds