Skip to content
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

Change UART timeout to seconds in examples #63

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

caternuson
Copy link
Contributor

@caternuson caternuson commented Feb 23, 2023

Fixes #44. And possibly #46. Also, #58 is similar, but using Pyserial via an FTDI cable, which the example do not directly cover.

Looks like the timeout value used for UART in several of the examples was being set in milliseconds instead of seconds. So the read was waiting 100 seconds. May still be a response length mismatch issue, but relying on the timeout to end the read seems to work based on pn532_simpletest example in UART mode:

Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Feather M4 Express with samd51j19
>>> import pn532_simpletest
Found PN532 with firmware version: 1.6
Waiting for RFID/NFC card...
......Found card with UID: ['0x56', '0x58', '0x8f', '0x7c']
.Found card with UID: ['0x56', '0x58', '0x8f', '0x7c']
.Found card with UID: ['0x56', '0x58', '0x8f', '0x7c']
.Found card with UID: ['0x56', '0x58', '0x8f', '0x7c']
.Found card with UID: ['0x56', '0x58', '0x8f', '0x7c']

@caternuson caternuson requested a review from a team February 23, 2023 20:43
Copy link
Contributor

@FoamyGuy FoamyGuy 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 to me.

I tested the change successfully on a Itsy Bitsy NRF5284 with cp 8.0.3.

Thanks for the fix @caternuson!

@FoamyGuy FoamyGuy merged commit a7287d2 into adafruit:main Feb 27, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 28, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306 to 1.6.0 from 1.5.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306#31 from dglaude/0.49''-64-x-32
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 to 3.3.7 from 3.3.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_IS31FL3731#53 from EAGrahamJr/fade_52
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_PN532 to 2.3.16 from 2.3.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_PN532#63 from caternuson/iss44
  > Merge pull request adafruit/Adafruit_CircuitPython_PN532#62 from caternuson/iss49
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 2.1.14 from 2.1.13:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#44 from jerryneedell/jerryn_size
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1675 to 1.1.16 from 1.1.15:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1675#14 from jposada202020/updating_example
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1680 to 1.0.14 from 1.0.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1680#12 from jposada202020/adding_breakout_example
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1680#11 from jposada202020/main
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1680#9 from dave-ct/128
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_Touchscreen to 1.2.0 from 1.1.17:
  > Merge pull request adafruit/Adafruit_CircuitPython_Touchscreen#23 from rtwfroody/invert
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_AirLift to 1.0.9 from 1.0.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_AirLift#8 from glenrobertson/patch-1
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.7.0 from 2.6.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#105 from FoamyGuy/multicolor_comet

Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 3.0.11 from 3.0.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#88 from Lnk2past/master
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 7.3.1 from 7.3.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#156 from vladak/suback_var_payload
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#153 from vladak/back_off_tests

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

get_passive_target is asking for more data from the UART than is provided, so we are blocking
2 participants