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); | ||
44 | } | 46 | } | ||
45 | 47 | | |||
46 | void Dome::setTelescope(ISD::GDInterface *newTelescope) | 48 | void Dome::setTelescope(ISD::GDInterface *newTelescope) | ||
47 | { | 49 | { | ||
48 | if (currentDome == nullptr) | 50 | if (currentDome == nullptr) | ||
49 | return; | 51 | return; | ||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | |||||
116 | } | 118 | } | ||
117 | 119 | | |||
118 | void Dome::setAzimuthPosition(double position) | 120 | void Dome::setAzimuthPosition(double position) | ||
119 | { | 121 | { | ||
120 | if (currentDome) | 122 | if (currentDome) | ||
121 | currentDome->setAzimuthPosition(position); | 123 | currentDome->setAzimuthPosition(position); | ||
122 | } | 124 | } | ||
123 | 125 | | |||
126 | bool Dome::hasShutter() | ||||
127 | { | ||||
128 | if (currentDome) | ||||
129 | return currentDome->hasShutter(); | ||||
130 | // no dome, no shutter | ||||
131 | return false; | ||||
132 | } | ||||
133 | | ||||
134 | bool Dome::controlShutter(bool open) | ||||
135 | { | ||||
136 | | ||||
137 | if (currentDome) | ||||
138 | return currentDome->ControlShutter(open); | ||||
139 | // no dome, no shutter control | ||||
140 | return false; | ||||
141 | } | ||||
142 | | ||||
124 | #if 0 | 143 | #if 0 | ||
125 | Dome::ParkingStatus Dome::getParkingStatus() | 144 | Dome::ParkingStatus Dome::getParkingStatus() | ||
126 | { | 145 | { | ||
127 | if (currentDome == nullptr || currentDome->canPark() == false) | 146 | if (currentDome == nullptr || currentDome->canPark() == false) | ||
128 | return PARKING_ERROR; | 147 | return PARKING_ERROR; | ||
129 | 148 | | |||
130 | ISwitchVectorProperty *parkSP = currentDome->getBaseDevice()->getSwitch("DOME_PARK"); | 149 | ISwitchVectorProperty *parkSP = currentDome->getBaseDevice()->getSwitch("DOME_PARK"); | ||
131 | 150 | | |||
Show All 28 Lines |