Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

set_pin_mode was never awaited for sonar_config #35

Closed
thiezn opened this issue Feb 9, 2016 · 1 comment
Closed

set_pin_mode was never awaited for sonar_config #35

thiezn opened this issue Feb 9, 2016 · 1 comment

Comments

@thiezn
Copy link

thiezn commented Feb 9, 2016

Hi, sorry if this is not the right way or format to report an issue, I'm a rookie regarding git (and programming for that matter!)

I'm using the pymata3 class to try and initialize my HR-SR04 sensor and get the following warnings:

/usr/local/lib/python3.5/site-packages/pymata_aio/pymata_core.py:1098: RuntimeWarning: coroutine 'PymataCore.set_pin_mode' was never awaited
  self.set_pin_mode(trigger_pin, Constants.SONAR, Constants.INPUT)
/usr/local/lib/python3.5/site-packages/pymata_aio/pymata_core.py:1099: RuntimeWarning: coroutine 'PymataCore.set_pin_mode' was never awaited
  self.set_pin_mode(echo_pin, Constants.SONAR, Constants.INPUT)

Looking at pymata_core.py lines 1098/1099 it seems they are called as a normal function instead of a coroutine. I think these lines should be prepended with await (or yield from on python <=3.4)

Thanks,
Thiezn

@MrYsLab
Copy link
Owner

MrYsLab commented Feb 9, 2016

@thiezn That was a great catch - you are completely correct. I will be updating with the fix for the next release within an hour or so.
Thanks again.

@MrYsLab MrYsLab closed this as completed Feb 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants