Andrea Di Paola replied to the topic 'Hide default INDI properties' in the forum. 8 years ago

I attempted your same test WITHOUT success.
To be sure it does not depend on my installation of the OS or of the INDI library, I repeated the whole job using a Virtual Machine downloaded from osboxes.org.
I used again the openSuse distribution 13.2, upgraded the system, installed the required packages and then a freshly downloaded indilib sources.
I loaded only the indi_simulator_telescope driver into indiserver and tried using DCD to connect (all properties appear) and disconnect (connect properties remain visible and the interface DOES NOT return back to pre-connection situation!).
At this point I also implemented the change in the driver with deleteProperty called into ISGetProperties but, as before, the properties still REMAIN VISIBLE both in DCD and with indi_getprop.
I am going to repeat the same test within an Ubuntu VM just in case...

Read More...

Andrea Di Paola replied to the topic 'Hide default INDI properties' in the forum. 8 years ago

Thanks, but neither this works :(

I also tried inside ::initProperties, both before and after call to INDI::Telescope::initProperties but no result...
The properties remain always visible in interfaces and also with indi_getprop.

Other ideas?

P.S.: I am working with self compiled INDI v 1.2.0 on OpenSUSE

Read More...

Andrea Di Paola replied to the topic 'Hide default INDI properties' in the forum. 8 years ago

Possibly I still need some help...

In my code I have two ISGetProperties functions that call eachother:

// the first 
void ISGetProperties(const char *dev)
{
    if(dev && strcmp(mydev, dev)) return;
    ISInit();
    mydriverclass->ISGetProperties(dev);
}

// and the second
void MyDriverClass::ISGetProperties(const char *dev)
{
    INDI::Telescope::ISGetProperties(dev);

    // some unrelated code here

    addAuxControls();
}

unfortunately I could not find where to put the following code:
deleteProperty(PortTP.name);
deleteProperty(BaudRateSP.name);

I suppose the second to be the function I should change, but the deleteProperty calls do not work either before or after the call to the INDI::Telescope::ISGetProperties(dev) function. What am I doing wrong?

thanks

Read More...

Andrea Di Paola created a new topic ' Hide default INDI properties' in the forum. 8 years ago

Hello,
is it safe and possible to delete default properties without modifing the core INDI classes?

For instance, the telescope class defines SerialPort and BaudRate, but my hardware works in another way. I am wondering if it is possible to remove these properties working from the derived class so not to show them to the user.

It seems to me that deleteProperty does not get to the point since the delete properties are still listed...

thanks

Read More...