Skip to content

Enhance transmit in GenericTransmit to optionally allow sending bits and repeating commands #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

kevinjwalters
Copy link

@kevinjwalters kevinjwalters commented Apr 9, 2021

Added nbits to transmit() to allow it to send less bits than in the data bytes. This is essential for the 20bit codes used by Sony (#44). Also added repeat and delay to allow a command to be repeated a few times - seems to be common practice in many IR systems to increase reliability of the (simplex) transmission.

Added a debug arg to GenericTransmit constructor to control the previously commented out printing of durations inside transmit() as it looked useful. Passing a trail value of None now disables it - this is required for Sony codes.

Tested with https://github.com/kevinjwalters/circuitpython-examples/blob/master/cpx/cpx-ir-shutter-remote.py

Kevin J Walters added 2 commits April 9, 2021 18:24
transmit now takes some keyword args to control additional repeats, delays for those repeats and nbits to allow a number of bits less than those in data bytes (useful for Sony codes).
debug option added to constructor to control previously commented out printing of durations.
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@tannewt tannewt merged commit d8260f2 into adafruit:master Apr 12, 2021
@kevinjwalters kevinjwalters changed the title Enhance transmit in GenericTransmit to optionally allowing sending bits and repeating commands Enhance transmit in GenericTransmit to optionally allow sending bits and repeating commands Apr 13, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 15, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_BME280 to 2.6.1 from 2.6.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BME280#46 from jposada202020/improving_docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 5.3.0 from 5.2.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#78 from ViennaMike/axis_remap

Updating https://github.com/adafruit/Adafruit_CircuitPython_IRRemote to 4.0.6 from 4.0.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_IRRemote#46 from kevinjwalters/tx-var-bits
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_SHTC3 to 1.0.6 from 1.0.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_SHTC3#7 from jposada202020/improving_docs
  > "Increase duplicate code check threshold "
  > Merge pull request adafruit/Adafruit_CircuitPython_SHTC3#6 from FoamyGuy/pylintrc_and_versions

Updating https://github.com/adafruit/Adafruit_CircuitPython_MIDI to 1.4.0 from 1.3.5:
  > Added copyright information
  > Merge pull request adafruit/Adafruit_CircuitPython_MIDI#27 from gamblor21/add_control_values

Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleMath to 2.0.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleMath#2 from lesamouraipourpre/unconstrained-map-range
  > Added tests check to pre commit config
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_Colorsys
@kevinjwalters kevinjwalters mentioned this pull request Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants