def __init__( self, bit_one_part_min_duration=55, # microseconds bit_one_part_max_duration=61, bit_one_part_duration=58, bit_zero_part_min_duration=95, bit_zero_part_max_duration=9900, bit_zero_part_duration=100, packet_separation=5): """ These arguments should be helpful in tweaking the outputs to better fit the hardware or specific decoder requirements. I.e. if your hardware shapes the signal on longer/shorter intervals than the actual value, it can be adjusted here. Currently only bit_X_part_duration and packet_separation are used. Older decoders need a 5ms packet separation. Performance should improve by making it 0 if working with new decoders. """ DCCEncoder.__init__(self, bit_one_part_min_duration, bit_one_part_max_duration, bit_one_part_duration, bit_zero_part_min_duration, bit_zero_part_max_duration, bit_zero_part_duration, packet_separation) self._string_payload = "" self._idle_packet_string = self.idle_packet.to_bit_string() self._reset_packet_string = self.reset_packet.to_bit_string() self._stop_packet_string = self.stop_packet.to_bit_string()
def __init__(self, bit_one_part_min_duration=55, # microseconds bit_one_part_max_duration=61, bit_one_part_duration=58, bit_zero_part_min_duration=95, bit_zero_part_max_duration=9900, bit_zero_part_duration=100, packet_separation=5,pin_a=1,pin_b=2,pin_break=3): """ These arguments should be helpful in tweaking the outputs to better fit the hardware or specific decoder requirements. I.e. if your hardware shapes the signal on longer/shorter intervals than the actual value, it can be adjusted here. Currently only bit_X_part_duration and packet_separation are used. Older decoders need a 5ms packet separation. Performance should improve by making it 0 if working with new decoders. """ self.set_pins(pin_a,pin_b,pin_break) DCCEncoder.__init__(self, bit_one_part_min_duration, bit_one_part_max_duration, bit_one_part_duration, bit_zero_part_min_duration, bit_zero_part_max_duration, bit_zero_part_duration, packet_separation) self._string_payload = "" self._idle_packet_string = self.idle_packet.to_bit_string() self._reset_packet_string = self.reset_packet.to_bit_string() self._stop_packet_string = self.stop_packet.to_bit_string()
def __init__(self): DCCEncoder.__init__(self)