Skip to content

Commit e672a4d

Browse files
Added slew, home, park display to Telescope control
1 parent 51b3cbc commit e672a4d

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

ASCOM.Alpaca.Simulators/Pages/TelescopeControl.razor

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<div class="grid-item-right">
1919
<button @onclick="Setup">Setup</button>
2020
</div>
21+
</div>
22+
<div class="grid-container-two">
2123

2224
<div class="grid-item-right">
2325
<label>LST</label>
@@ -54,6 +56,11 @@
5456
<p>@AltText</p>
5557
</div>
5658
</div>
59+
<div class="centered">
60+
<label style="color:@SlewColor">@SlewText</label>&nbsp;
61+
<label style="color:@HomeColor">@HomeText</label>&nbsp;
62+
<label style="color:@ParkColor">@ParkText</label>
63+
</div>
5764
</fieldset>
5865
</body>
5966

@@ -212,6 +219,95 @@
212219
}
213220
}
214221

222+
public string SlewText
223+
{
224+
get
225+
{
226+
if (Connected)
227+
{
228+
if (Device.Slewing)
229+
{
230+
return "Slewing";
231+
}
232+
}
233+
return "Not Slewing";
234+
}
235+
}
236+
237+
public string SlewColor
238+
{
239+
get
240+
{
241+
if (Connected)
242+
{
243+
if (Device.Slewing)
244+
{
245+
return "Green";
246+
}
247+
}
248+
return "Red";
249+
}
250+
}
251+
252+
public string HomeText
253+
{
254+
get
255+
{
256+
if (Connected)
257+
{
258+
if (Device.AtHome)
259+
{
260+
return "At Home";
261+
}
262+
}
263+
return "Not At Home";
264+
}
265+
}
266+
267+
public string HomeColor
268+
{
269+
get
270+
{
271+
if (Connected)
272+
{
273+
if (Device.AtHome)
274+
{
275+
return "Green";
276+
}
277+
}
278+
return "Red";
279+
}
280+
}
281+
282+
public string ParkText
283+
{
284+
get
285+
{
286+
if (Connected)
287+
{
288+
if (Device.AtPark)
289+
{
290+
return "Parked";
291+
}
292+
}
293+
return "Not Parked";
294+
}
295+
}
296+
297+
public string ParkColor
298+
{
299+
get
300+
{
301+
if (Connected)
302+
{
303+
if (Device.AtPark)
304+
{
305+
return "Green";
306+
}
307+
}
308+
return "Red";
309+
}
310+
}
215311

216312
#endregion
217313

0 commit comments

Comments
 (0)