diff --git a/examples/backlash.py b/examples/backlash.py index 36306ea..9d20418 100755 --- a/examples/backlash.py +++ b/examples/backlash.py @@ -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: diff --git a/examples/batch_align.py b/examples/batch_align.py index 6dd1587..a442082 100755 --- a/examples/batch_align.py +++ b/examples/batch_align.py @@ -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() diff --git a/examples/drift_test.py b/examples/drift_test.py index 1bb10cb..a4e7c88 100755 --- a/examples/drift_test.py +++ b/examples/drift_test.py @@ -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: diff --git a/examples/home.py b/examples/home.py index e1b7467..e81be19 100755 --- a/examples/home.py +++ b/examples/home.py @@ -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 ''' diff --git a/examples/report.py b/examples/report.py index 55507b7..f9d82c4 100755 --- a/examples/report.py +++ b/examples/report.py @@ -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' @@ -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: diff --git a/examples/slew.py b/examples/slew.py index dcc93ac..01a7daf 100755 --- a/examples/slew.py +++ b/examples/slew.py @@ -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 ''' diff --git a/examples/stress_test.py b/examples/stress_test.py index 1d57704..f018008 100755 --- a/examples/stress_test.py +++ b/examples/stress_test.py @@ -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() @@ -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 @@ -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 @@ -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: @@ -87,5 +93,5 @@ def stress_test(): return # Scope now tracking - print_status(config.scope, 'TRK') + print_status('TRK') time.sleep(tracking_duration) diff --git a/lx200/onstep.py b/lx200/onstep.py index 090055c..08cbffa 100644 --- a/lx200/onstep.py +++ b/lx200/onstep.py @@ -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' @@ -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' @@ -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' @@ -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('#', '')