#NEWLINE# def __init__( self , data ) : #NEWLINE# #INDENT# super ( D1011 , self ) . __init__ ( self ) #NEWLINE# self . _unpack ( '<H2x' , [ 'index' ] ) #NEWLINE# self . _parse ( TimeType , 'start_time' ) #NEWLINE# self . _unpack ( '<Iff' , [ 'total_time' , 'total_dist' , 'max_speed' ] ) #NEWLINE# self . _parse ( PositionType , 'begin' ) #NEWLINE# self . _parse ( PositionType , 'end' ) #NEWLINE# self . _unpack ( 'HBBBBB' , [ 'calories' , 'avg_heart_rate' , 'max_heart_rate' , 'intensity' , 'avg_cadence' , 'trigger_method' ] ) #NEWLINE# if ( self . avg_heart_rate == 0 ) : #NEWLINE# #INDENT# self . avg_heart_rate = None #NEWLINE# #UNINDENT# if ( self . max_heart_rate == 0 ) : #NEWLINE# #INDENT# self . max_heart_rate = None #NEWLINE# #UNINDENT# if ( self . avg_cadence == 255 ) : #NEWLINE# #INDENT# self . avg_cadence = None