Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/backlash.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def backlash():
if backlash <= 999:
print('Setting backlash to calculated value')
config.scope.set_backlash(axis, backlash)
ans = input(test)
ans = input(msg_test)
else:
print('ERROR: backlash is more than maximum of 999')
else:
Expand Down
6 changes: 3 additions & 3 deletions examples/batch_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ def batch_align():
config.scope.send_str(':SX0C,06:00:54#')
config.scope.send_str(':SX0D,44:56:53#')
config.scope.send_str(':SX0E,-1#')

print('Triggering align')
# Trigger align
config.scope.send_str(':SX09,1#')

print('Align status: ' + str(config.scope.get_align_status()))

count = 0
while count < 30:
ra = config.scope.get_ra()
de = config.scope.get_de()

cor_azm = config.scope.get_cor_azm()
cor_alt = config.scope.get_cor_alt()
cor_do = config.scope.get_cor_do()
Expand Down
2 changes: 1 addition & 1 deletion examples/drift_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def drift_test(iterations = 60, interval = 10):

dt = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print('%s %s %s %s %s %s %s %s' % (dt, home, status, curr_ra, curr_de, equ, '{:6.3f}'.format(ra_arc_secs), '{:6.3f}'.format(de_arc_secs)))

try:
time.sleep(interval)
except KeyboardInterrupt:
Expand Down
2 changes: 1 addition & 1 deletion examples/home.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
'''
This is the program used to end a test sequence.
This is the program used to end a test sequence.
It displays the date/time, UTC offset, latitude and longitude
It then issues the command to return the scope to the home position
'''
Expand Down
4 changes: 2 additions & 2 deletions examples/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def report(interval = 10):

if config.scope.is_slewing is True:
status = 'SLW'

if config.scope.is_tracking is True:
status = 'TRK'

Expand All @@ -26,7 +26,7 @@ def report(interval = 10):

dt = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print('%s %s %s %s' % (dt, status, curr_ra, curr_de))

try:
time.sleep(interval)
except KeyboardInterrupt:
Expand Down
2 changes: 1 addition & 1 deletion examples/slew.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
'''
This is the program used to end a test sequence.
This is the program used to end a test sequence.
It displays the date/time, UTC offset, latitude and longitude
It then issues the command to return the config.scope to the home position
'''
Expand Down
20 changes: 13 additions & 7 deletions examples/stress_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
azm_e = '170:00:00'

num_iterations = 20
poll_duration = 30
tracking_duration = 30
poll_duration = 20
tracking_duration = 20

def print_status(status = ''):
curr_alt = config.scope.get_alt()
Expand Down Expand Up @@ -46,6 +46,12 @@ def slew(target_alt, target_azm):
def stress_test():
count = 0

print('Starting tracking')
if config.scope.tracking_on() == '0':
print('Tracking failed')
time.sleep(3)
return

while True:
# Increment the iteration counter
count = count + 1
Expand All @@ -59,13 +65,13 @@ def stress_test():
print('Iteration: ' + str(count))

# Switch between east of meridian and west of it, using azimuth
if count % 2:
if count % 2:
azm = azm_w
else:
azm = azm_e

# Slew to target location
slew(config.scope, alt, azm)
slew(alt, azm)

slew_end = False
# Check for end of slew
Expand All @@ -74,11 +80,11 @@ def stress_test():
try:
# Check if the slew ended
config.scope.update_status()
if config.scope.is_slewing is False and scope.is_tracking is True:
if config.scope.is_slewing is False and config.scope.is_tracking is True:
# Slew ended
slew_end = True

print_status(config.scope, 'SLW')
print_status('SLW')
time.sleep(poll_duration)

except KeyboardInterrupt:
Expand All @@ -87,5 +93,5 @@ def stress_test():
return

# Scope now tracking
print_status(config.scope, 'TRK')
print_status('TRK')
time.sleep(tracking_duration)
8 changes: 4 additions & 4 deletions lx200/onstep.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def slew_equ(self):
rc = self.scope.recv()
if rc == '0':
return rc, 'Goto is possible'
elif rc == '1':
elif rc == '1':
return rc, 'below the horizon limit'
elif rc == '2':
return rc, 'above overhead limit'
Expand All @@ -203,7 +203,7 @@ def slew_hor(self):
rc = self.scope.recv()
if rc == '0':
return rc, 'Goto is possible'
elif rc == '1':
elif rc == '1':
return rc, 'below the horizon limit'
elif rc == '2':
return rc, 'above overhead limit'
Expand All @@ -230,7 +230,7 @@ def slew_polar(self):
rc = self.scope.recv()
if rc == '0':
return rc, 'Goto is possible'
elif rc == '1':
elif rc == '1':
return rc, 'below the horizon limit'
elif rc == '2':
return rc, 'above overhead limit'
Expand Down Expand Up @@ -283,7 +283,7 @@ def get_backlash(self, axis = 1):
return self.scope.recv().replace('#', '')

def get_debug_equ(self):
# Get Equatorial values in decimal
# Get Equatorial values in decimal
self.scope.send(':GXFE#')
return self.scope.recv().replace('#', '')

Expand Down