Closed jharris1993 closed 2 years ago
Since easygopigo3.py already imports time, suggest not including the
from time import sleep
and simply markup the sleep(0.25) as
time.sleep(0.25)
Oops!
How do I fix that? Open another pull request?
You simply need to change the files in your own github and it should reflect the changes here. Also downgrade the 0.25 to 0.1, please.
I was confused because the e-mail that GitHub produces is sparse to say the least.
I did what you asked, but I am curious as to why I should reduce the sleep time from 1/4 of a second to 1/10 of a second, as I wanted to give the robot enough time to fully stop, (even if moving quickly), before free-wheeling the motors.
I also removed the import sleep from time and changed the time callout in the method to time.sleep()
Note that I did NOT mess with the version number. Maybe I should have, but I thought it best to leave file versioning up to you.
Cool Beanies!
I pushed to my branch and it automagically updates here!
Additional comment:
At the very end of the file, there are two lines:
warnings.warn(deprecated_msg.format(sensor_description), DeprecationWarning)
print(deprecated_msg.format(sensor_description))
I get two problems reported in VS Code that "sensor_description is not defined"
I have ignored them for the purposes of this commit since it seems to work anyway.
Any idea what's going on? Just curious. Maybe it's my whacked-out linter?
Just as I was about to merge this, I notice you added some unrelated PDFs that do not need to be in this repo. Please remove them from this PR.
"Just as I was about to merge this, I notice you added some unrelated PDFs that do not need to be in this repo. Please remove them from this PR."
Done.
I'm still learning about GitHub and, apparently, after I have opened a pull request, any further work I do on my repository automagically gets included, like it or not.
In this case I was looking at the possibility of a one-for-one replacement of the switching MOSFET to increase the current capability of the GoPiGo3's power supply and I added some technical documentation to the project, forgetting that every time I sneeze I add something to the PR. (grrr)
This update adds a set_motor_power() call to the stop() method to turn off power to the motors after stopping the robot.
It also adds a 0.25 second safety delay to prevent inertia from causing the motor to coast.
Depends on: module "sleep" from time.
Justification:
Battery power is a limited resource.
Component lifetime can be degraded.