Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/guide/guide.cpp
Context not available. | |||||
1337 | 1337 | | |||
---|---|---|---|---|---|
1338 | void Guide::updateCCDBin(int index) | 1338 | void Guide::updateCCDBin(int index) | ||
1339 | { | 1339 | { | ||
1340 | if (currentCCD == nullptr && guiderType != GUIDE_INTERNAL) | 1340 | if (currentCCD == nullptr || guiderType != GUIDE_INTERNAL) | ||
1341 | return; | 1341 | return; | ||
1342 | 1342 | | |||
1343 | ISD::CCDChip *targetChip = currentCCD->getChip(useGuideHead ? ISD::CCDChip::GUIDE_CCD : ISD::CCDChip::PRIMARY_CCD); | 1343 | ISD::CCDChip *targetChip = currentCCD->getChip(useGuideHead ? ISD::CCDChip::GUIDE_CCD : ISD::CCDChip::PRIMARY_CCD); | ||
Context not available. | |||||
1458 | return false; | 1458 | return false; | ||
1459 | } | 1459 | } | ||
1460 | 1460 | | |||
1461 | if (guider) | 1461 | if (guider != nullptr) | ||
1462 | { | 1462 | { | ||
1463 | // Disconnect from host | 1463 | // Disconnect from host | ||
1464 | if (guider->isConnected()) | 1464 | if (guider->isConnected()) | ||
Context not available. | |||||
1562 | break; | 1562 | break; | ||
1563 | } | 1563 | } | ||
1564 | 1564 | | |||
1565 | connect(guider, SIGNAL(frameCaptureRequested()), this, SLOT(capture())); | 1565 | if (guider != nullptr) | ||
1566 | connect(guider, SIGNAL(newLog(QString)), this, SLOT(appendLogText(QString))); | 1566 | { | ||
1567 | connect(guider, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(setStatus(Ekos::GuideState))); | 1567 | connect(guider, SIGNAL(frameCaptureRequested()), this, SLOT(capture())); | ||
1568 | connect(guider, SIGNAL(newStarPosition(QVector3D, bool)), this, SLOT(setStarPosition(QVector3D, bool))); | 1568 | connect(guider, SIGNAL(newLog(QString)), this, SLOT(appendLogText(QString))); | ||
1569 | connect(guider, SIGNAL(newStatus(Ekos::GuideState)), this, SLOT(setStatus(Ekos::GuideState))); | ||||
1570 | connect(guider, SIGNAL(newStarPosition(QVector3D, bool)), this, SLOT(setStarPosition(QVector3D, bool))); | ||||
1569 | 1571 | | |||
1570 | connect(guider, SIGNAL(newAxisDelta(double, double)), this, SLOT(setAxisDelta(double, double))); | 1572 | connect(guider, SIGNAL(newAxisDelta(double, double)), this, SLOT(setAxisDelta(double, double))); | ||
1571 | connect(guider, SIGNAL(newAxisPulse(double, double)), this, SLOT(setAxisPulse(double, double))); | 1573 | connect(guider, SIGNAL(newAxisPulse(double, double)), this, SLOT(setAxisPulse(double, double))); | ||
1572 | connect(guider, SIGNAL(newAxisSigma(double, double)), this, SLOT(setAxisSigma(double, double))); | 1574 | connect(guider, SIGNAL(newAxisSigma(double, double)), this, SLOT(setAxisSigma(double, double))); | ||
1575 | } | ||||
1573 | 1576 | | |||
1574 | externalConnectB->setEnabled(false); | 1577 | externalConnectB->setEnabled(false); | ||
1575 | externalDisconnectB->setEnabled(false); | 1578 | externalDisconnectB->setEnabled(false); | ||
1576 | 1579 | | |||
1577 | if (guiderType != GUIDE_INTERNAL) | 1580 | if (guider != nullptr && guiderType != GUIDE_INTERNAL) | ||
1578 | { | 1581 | { | ||
1579 | externalConnectB->setEnabled(!guider->isConnected()); | 1582 | externalConnectB->setEnabled(!guider->isConnected()); | ||
1580 | externalDisconnectB->setEnabled(guider->isConnected()); | 1583 | externalDisconnectB->setEnabled(guider->isConnected()); | ||
1581 | } | 1584 | } | ||
1582 | 1585 | | |||
1583 | guider->Connect(); | 1586 | if (guider != nullptr) | ||
1587 | guider->Connect(); | ||||
1584 | 1588 | | |||
1585 | return true; | 1589 | return true; | ||
1586 | } | 1590 | } | ||
Context not available. |