Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Oh crap. This is embarrassing. Here's a patch to fix it (applicable to the
trunk or stable v2.0.1). Let me know if it works, and whether the values
returned are correct. It would also be nice if you could test switching between
ranges.
This problem was due to lack of being able to actually test some of the sensors
due to lack of hardware. If you have any other sensors marked as untested in
the docstrings, it would be cool if you could make sure they work with
nxt-python. Thanks!
Original comment by marcus@wanners.net
on 23 Jan 2011 at 12:01
Attachments:
The patch works, however, you forgot to import the math module(you're calling
sqrt in EOPD.get_processed_value). After fixing this, the EOPD class works
without raising exceptions - I don't think the values it's returning are
correct, though I'm not sure what the units of measurement are for this sensor.
I'll work some on this later to help fix it. I'll also test the other Hitechnic
sensors that I have.
Thanks for writing nxt-python, and don't worry about bugs in code you can't
test - I'm glad I can program my NXT in Python. You might want to try out
Pylint sometime. I think it would have caught these bugs.
Original comment by jerradge...@gmail.com
on 23 Jan 2011 at 12:27
Thank you. I'll be releasing a bugfix version once all the bugs in the sensors
you have are ironed out. This is really helpful!
I'll look at pylint when I get some spare time. As I've told some other people,
I'm currently rushing to get IPv6 up on my servers and home network before all
the tunnel brokers are clogged with new accounts and it becomes hard to test
things. Hurricane Electric is currently estimating 10 days to IPv4 exhaustion.
What a nice birthday surprise.
Original comment by marcus@wanners.net
on 23 Jan 2011 at 12:34
Fixed in r275.
Original comment by marcus@wanners.net
on 23 Jan 2011 at 1:18
Original issue reported on code.google.com by
jerradge...@gmail.com
on 22 Jan 2011 at 11:25