#NEWLINE# def __init__( self , machine ) : #NEWLINE# #INDENT# self . log = logging . getLogger ( 'ball_search' ) #NEWLINE# self . machine = machine #NEWLINE# self . active = False #NEWLINE# self . ball_search_coils = [ ] #NEWLINE# for coil in self . machine . coils . items_tagged ( 'ball_search' ) : #NEWLINE# #INDENT# self . ball_search_coils . append ( coil ) #NEWLINE# #UNINDENT# self . log . debug ( 'Found %s ball search coils' , len ( self . ball_search_coils ) ) #NEWLINE# self . machine . events . add_handler ( 'ball_search_begin_phase1' , self . start ) #NEWLINE# self . machine . events . add_handler ( 'ball_search_begin_phase2' , self . start ) #NEWLINE# self . machine . events . add_handler ( 'ball_search_end' , self . end )