Closed computer-whisperer closed 9 years ago
For future reference, when a bugfix is small like this, would you rather me PR the ~1 line fix, or just mention it here for someone else to piggy-back it onto another commit of theirs?
Just found another bug:
#This fails
wpilib.Timer.delay(1)
Traceback (most recent call last):
File "/home/christian/PycharmProjects/Python testing ground/Timerbug.py", line 3, in <module>
wpilib.Timer.delay(1)
File "/home/christian/PycharmProjects/robotpy-2015-fork/wpilib/wpilib/timer.py", line 51, in delay
hal.delaySeconds(seconds)
File "<string>", line 2, in delaySeconds
AssertionError: isinstance(s, float); with s=1, type(s)=int
#But this works just fine
wpilib.Timer.delay(1.0)
Just PR the one line fix if it's not too inconvenient, then I can just hit the merge button. :)
Fixed in #44
If the Timer.getFPGATimestamp() method is supposed to return the value in seconds, it seems to be living in Narnia. After one second of run time, it currently returns .1, rather than 1.
I suppose that this is due to a missing zero either in hal-sim or wpilib, but I don't know what the value of hal.getFPGATime is supposed to be.