Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/auxiliary/dome.cpp
Show All 33 Lines | 31 | { | |||
---|---|---|---|---|---|
34 | 34 | | |||
35 | currentDome = static_cast<ISD::Dome *>(newDome); | 35 | currentDome = static_cast<ISD::Dome *>(newDome); | ||
36 | 36 | | |||
37 | currentDome->disconnect(this); | 37 | currentDome->disconnect(this); | ||
38 | 38 | | |||
39 | connect(currentDome, &ISD::Dome::newStatus, this, &Dome::newStatus); | 39 | connect(currentDome, &ISD::Dome::newStatus, this, &Dome::newStatus); | ||
40 | connect(currentDome, &ISD::Dome::newParkStatus, this, &Dome::newParkStatus); | 40 | connect(currentDome, &ISD::Dome::newParkStatus, this, &Dome::newParkStatus); | ||
41 | connect(currentDome, &ISD::Dome::newParkStatus, [&](ISD::ParkStatus status) {m_ParkStatus = status;}); | 41 | connect(currentDome, &ISD::Dome::newParkStatus, [&](ISD::ParkStatus status) {m_ParkStatus = status;}); | ||
42 | connect(currentDome, &ISD::Dome::newShutterStatus, this, &Dome::newShutterStatus); | ||||
43 | connect(currentDome, &ISD::Dome::newShutterStatus, [&](ISD::Dome::ShutterStatus status) {m_ShutterStatus = status;}); | ||||
42 | connect(currentDome, &ISD::Dome::azimuthPositionChanged, this, &Dome::azimuthPositionChanged); | 44 | connect(currentDome, &ISD::Dome::azimuthPositionChanged, this, &Dome::azimuthPositionChanged); | ||
43 | connect(currentDome, &ISD::Dome::ready, this, &Dome::ready); | 45 | connect(currentDome, &ISD::Dome::ready, this, &Dome::ready); | ||
46 | connect(currentDome, &ISD::Dome::Disconnected, this, &Dome::disconnected); | ||||
44 | } | 47 | } | ||
45 | 48 | | |||
46 | void Dome::setTelescope(ISD::GDInterface *newTelescope) | 49 | void Dome::setTelescope(ISD::GDInterface *newTelescope) | ||
47 | { | 50 | { | ||
48 | if (currentDome == nullptr) | 51 | if (currentDome == nullptr) | ||
49 | return; | 52 | return; | ||
50 | 53 | | |||
51 | ITextVectorProperty *activeDevices = currentDome->getBaseDevice()->getText("ACTIVE_DEVICES"); | 54 | ITextVectorProperty *activeDevices = currentDome->getBaseDevice()->getText("ACTIVE_DEVICES"); | ||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | |||||
116 | } | 119 | } | ||
117 | 120 | | |||
118 | void Dome::setAzimuthPosition(double position) | 121 | void Dome::setAzimuthPosition(double position) | ||
119 | { | 122 | { | ||
120 | if (currentDome) | 123 | if (currentDome) | ||
121 | currentDome->setAzimuthPosition(position); | 124 | currentDome->setAzimuthPosition(position); | ||
122 | } | 125 | } | ||
123 | 126 | | |||
127 | bool Dome::hasShutter() | ||||
128 | { | ||||
129 | if (currentDome) | ||||
130 | return currentDome->hasShutter(); | ||||
131 | // no dome, no shutter | ||||
132 | return false; | ||||
133 | } | ||||
134 | | ||||
135 | bool Dome::controlShutter(bool open) | ||||
136 | { | ||||
137 | | ||||
138 | if (currentDome) | ||||
139 | return currentDome->ControlShutter(open); | ||||
140 | // no dome, no shutter control | ||||
141 | return false; | ||||
142 | } | ||||
143 | | ||||
124 | #if 0 | 144 | #if 0 | ||
125 | Dome::ParkingStatus Dome::getParkingStatus() | 145 | Dome::ParkingStatus Dome::getParkingStatus() | ||
126 | { | 146 | { | ||
127 | if (currentDome == nullptr || currentDome->canPark() == false) | 147 | if (currentDome == nullptr || currentDome->canPark() == false) | ||
128 | return PARKING_ERROR; | 148 | return PARKING_ERROR; | ||
129 | 149 | | |||
130 | ISwitchVectorProperty *parkSP = currentDome->getBaseDevice()->getSwitch("DOME_PARK"); | 150 | ISwitchVectorProperty *parkSP = currentDome->getBaseDevice()->getSwitch("DOME_PARK"); | ||
131 | 151 | | |||
Show All 28 Lines |