|
|
|
@ -80,12 +80,9 @@ class CastControl:
|
|
|
|
|
|
|
|
|
|
def cast_routine(self, start_parameters: dict): # main routine for one complete cast cycle |
|
|
|
|
|
|
|
|
|
"""PUT IN WAVECHECKER HERE""" |
|
|
|
|
#Check for wave good conditions |
|
|
|
|
wave_check = CastSafety() |
|
|
|
|
wave_conditions_safe, new_top_deploy, new_bottom_deploy = wave_check.check_wave_conditions() |
|
|
|
|
print(wave_conditions_safe) |
|
|
|
|
print(new_top_deploy) |
|
|
|
|
print(new_bottom_deploy) |
|
|
|
|
if wave_conditions_safe: |
|
|
|
|
print("wave conditions good. Cast is a-go.") |
|
|
|
|
top_line_deploy = new_top_deploy |
|
|
|
@ -93,8 +90,6 @@ class CastControl:
|
|
|
|
|
else: |
|
|
|
|
print("wave conditions bad. aborting cast!") |
|
|
|
|
return False |
|
|
|
|
"""PUT IN WAVECHECKER HERE""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# get start parameter |
|
|
|
|
#top_line_deploy = start_parameters['top_line_deploy'] |
|
|
|
@ -122,7 +117,6 @@ class CastControl:
|
|
|
|
|
winch.open_winch_connection() |
|
|
|
|
winch_ready = winch.is_winch_ready() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.countdown_to_next_movement(upcast_start_time) |
|
|
|
|
while datetime.datetime.now() < upcast_start_time: # wait for correct time for upcast |
|
|
|
|
time.sleep(1) |
|
|
|
@ -179,7 +173,7 @@ class CastControl:
|
|
|
|
|
while datetime.datetime.now() < next_movement_time - datetime.timedelta(seconds=5): |
|
|
|
|
time.sleep(1) |
|
|
|
|
time_left = int((next_movement_time - datetime.datetime.now()).total_seconds()) |
|
|
|
|
if time_left % 2 == 0: |
|
|
|
|
if time_left % 10 == 0: |
|
|
|
|
print("Waiting until "+str(next_movement_time)+" for next movement -> "+str(time_left)+"s...", end="\r") |
|
|
|
|
print("Waiting until " + str(next_movement_time) + " for next movement -> " + str(time_left) + "s...", end='') |
|
|
|
|
print(" Wait time complete.") |
|
|
|
|