Exemplo n.º 1
0
void GPhotoCCD::ISGetProperties(const char *dev)
{
  INDI::CCD::ISGetProperties(dev);

  defineText(&PortTP);
  loadConfig(true, "DEVICE_PORT");

  if (isConnected())
  {
      if (mIsoSP.nsp > 0)
            defineSwitch(&mIsoSP);
      if (mFormatSP.nsp > 0)
        defineSwitch(&mFormatSP);

      defineSwitch(&transferFormatSP);
      defineSwitch(&livePreviewSP);
      defineSwitch(&autoFocusSP);

      defineSwitch(&FocusMotionSP);
      defineNumber(&FocusSpeedNP);
      defineNumber(&FocusTimerNP);

      ShowExtendedOptions();

      ITextVectorProperty *modelTP = getText("model");
      if (modelTP && !strcmp(modelTP->label, "model") && strstr(modelTP->tp[0].text, "Canon"))
          defineNumber(&mMirrorLockNP);

  }

  // Add Debug, Simulator, and Configuration controls
  addAuxControls();
}
Exemplo n.º 2
0
void GPhotoCCD::ISGetProperties(const char *dev)
{
  INDI::CCD::ISGetProperties(dev);

  defineText(&PortTP);
  loadConfig(true, "DEVICE_PORT");

  if (isConnected())
  {
      if(PortTP.tp[0].text && strlen(PortTP.tp[0].text))
      {
          defineNumber(&mMirrorLockNP);
      }

      if (mIsoSP.nsp > 0)
            defineSwitch(&mIsoSP);
      if (mFormatSP.nsp > 0)
        defineSwitch(&mFormatSP);

      defineSwitch(&transferFormatSP);
      defineSwitch(&livePreviewSP);
      defineSwitch(&autoFocusSP);

      defineSwitch(&FocusMotionSP);
      defineNumber(&FocusSpeedNP);
      defineNumber(&FocusTimerNP);

      ShowExtendedOptions();
  }

  // Add Debug, Simulator, and Configuration controls
  addAuxControls();
}
Exemplo n.º 3
0
bool GPhotoCCD::updateProperties()
{
  INDI::CCD::updateProperties();

  if (isConnected())
  {      
      if (mIsoSP.nsp > 0)
        defineSwitch(&mIsoSP);
      if (mFormatSP.nsp > 0)
        defineSwitch(&mFormatSP);

      defineSwitch(&transferFormatSP);
      defineSwitch(&livePreviewSP);
      defineSwitch(&autoFocusSP);

      defineSwitch(&FocusMotionSP);
      defineNumber(&FocusSpeedNP);
      defineNumber(&FocusTimerNP);

      imageBP=getBLOB("CCD1");
      imageB=imageBP->bp;

      // Dummy values until first capture is done
      SetCCDParams(1280, 1024, 8, 5.4, 5.4);

    if (sim == false)
    {
        ShowExtendedOptions();
        DEBUG(INDI::Logger::DBG_SESSION, "Please update the camera pixel size in the Image Info section. The camera resolution will be updated after the first exposure is complete.");

        // Only show mirror lock if the camera is canon
        ITextVectorProperty *modelTP = getText("model");
        if (modelTP && !strcmp(modelTP->label, "model") && strstr(modelTP->tp[0].text, "Canon"))
            defineNumber(&mMirrorLockNP);
    }

    //timerID = SetTimer(POLLMS);
  } else
  {
    if (mIsoSP.nsp > 0)
       deleteProperty(mIsoSP.name);
    if (mFormatSP.nsp > 0)
       deleteProperty(mFormatSP.name);

    deleteProperty(mMirrorLockNP.name);

    deleteProperty(livePreviewSP.name);
    deleteProperty(autoFocusSP.name);    
    deleteProperty(transferFormatSP.name);
    deleteProperty(FocusMotionSP.name);
    deleteProperty(FocusSpeedNP.name);
    deleteProperty(FocusTimerNP.name);

    HideExtendedOptions();
    //rmTimer(timerID);
  }

  return true;
}