×
INDI Library v1.8.3 Released (02 Jan 2020)

Minor monthly bugfix release with a new RainbowAstro mount driver and improved pier side simulation.

getDriverInterface returns only 0

1 week 1 day ago
emk
Junior Boarder
Junior Boarder
Posts: 33
More
Topic Author
getDriverInterface returns only 0 #49400
Hey,
it's pretty much the title. I can't figure out what devices I'm receiving. Of course I know, but my client only sees, driver interface is 0, so it's useless. Am I doing anything wrong?
void client::newDevice(INDI::BaseDevice* dp)
{
  log("CLI:\tnew device: %s", dp->getDeviceName());
  
  uint16_t driver_interface = dp->getDriverInterface();
  log("driver_interface: %d", driver_interface);
  if( driver_interface & INDI::BaseDevice::DRIVER_INTERFACE::TELESCOPE_INTERFACE )
  {
    if (int_telescope==NULL && ( !strcmp(dp->getDeviceName(), TELE) || !strcmp(dp->getDeviceName(), TELE_SIM) ))
    {
      log("CLI:\tReceived Telescope:\t%s...", dp->getDeviceName());
  //     telescope = dp;
      int_telescope = new cl_TelescopeInterface(dp, this);
    }
    else if(int_telescope==NULL && !strcmp(dp->getDeviceName(), TELE_STAN))
    {
      log("CLI:\tReceived Telescope:\t%s...", dp->getDeviceName());
  //     telescope = dp;
  //     int_telescope = new cl_TelescopeInterface(dp, this);
      int_telescope = new cl_TelescopeHondelage(dp, this);

    }
    
    connect(int_telescope, SIGNAL(reachedTarget()), this, SLOT(reachedTarget()));
//     connect(int_telescope, SIGNAL(reachedTarget()), this, SLOT(setNewTransit()));
    connect(int_telescope, SIGNAL(reachedTarget()), this, SLOT(writeImageInfo2File()));
    connect(int_telescope, SIGNAL(slewingError()), this, SLOT(slewingError()));
  }
  else if( driver_interface & INDI::BaseDevice::DRIVER_INTERFACE::CCD_INTERFACE)
  {
    addCamera(dp);
  }
  else if( driver_interface & INDI::BaseDevice::DRIVER_INTERFACE::AUX_INTERFACE)
  {
    if (int_joystick==NULL && (!strcmp(dp->getDeviceName(), JOYSTICK)))
    {
      log("CLI:\tReceived Joystick:\t%s...", dp->getDeviceName());
      int_joystick = new cl_JoystickWingman(dp, this);
    }
}
  }

that second log statement always returns zero. I tried so far a few simulator drivers and the lx200gps and they all returned zero when asked for their interface.

Thanks in advance!

Cheers
Erik


INDI Library: 1.8.2
Code 1.8.2-tgz. Protocol 1.7.

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

Time to create page: 0.475 seconds