original_docstring:  Get pin and convert to bytearray 
docstring: Get pin and convert to bytearray
docstring_tokens: Get pin and convert to bytearray
code: def pmGetPin(self, pin):
          """ Get pin and convert to bytearray """
          if pin is None or pin == "" or len(pin) != 4:
              if self.OverrideCode is not None and len(self.OverrideCode) > 0:
                  pin = self.OverrideCode
              elif self.pmPowerlinkMode:
                  return True, self.pmPincode_t[0]   # if powerlink, then we downloaded the pin codes. Use the first one
              else:
                  log.warning("Warning: Valid 4 digit PIN needed and not in Powerlink mode")
                  return False, bytearray.fromhex("00 00 00 00")
          # insert a space character in between the 4 digits format will then be "XX XX"
          spin = pin[0:2] + " " + pin[2:4]
          return True, bytearray.fromhex(spin)
code_tokens: def pmGetPin ( self , pin ) : if pin is None or pin == "" or len ( pin ) != 4 : if self . OverrideCode is not None and len ( self . OverrideCode ) > 0 : pin = self . OverrideCode elif self . pmPowerlinkMode : return True , self . pmPincode_t [ 0 ] else : log . warning ( "Warning: Valid 4 digit PIN needed and not in Powerlink mode" ) return False , bytearray . fromhex ( "00 00 00 00" ) spin = pin [ 0 : 2 ] + " " + pin [ 2 : 4 ] return True , bytearray . fromhex ( spin )
short_docstring: Get pin and convert to bytearray
short_docstring_tokens: Get pin and convert to bytearray
comment: """ Get pin and convert to bytearray """$SEP$# if powerlink, then we downloaded the pin codes. Use the first one$SEP$# insert a space character in between the 4 digits format will then be "XX XX"