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
Am I doing this right? #39
Comments
A quick read; it looks OK to me. There are some C-isms there 😁. If you'd like I can massage it to how I would express it when I'm home from work and then you can take what you like and leave what you don't. |
That would be great. I really like go so far, the little bit that I have used it. |
Yeah, I noticed |
I've left commentary, though added some where I thought it would be useful for you.
The use of fatal over panic and recovery is something I am not yet convinced of either way. One thing that is odd is that when I run this, I get the following failure after variable amounts of time:
It works for a while, then the sensor attribute seems to disappear, though it comes back. Do you have any ideas what might be causing that? |
Ahh, it looks to me like it was a problem with the old kernel I was using - |
Thanks for the feedback. I think panic actually makes very good sense when working with motors. For example, I am now doing this:
So, if something bad happens (like a sensor comes unplugged, the motor will stop when the program exits because of the panic. |
You can do it more easily since
This gives you something like this (the balance of when to add a new
|
@dlech Can I close this? |
sure. |
I'm inexperienced in go, so I thought I would share my first ev3go program and see what you think.
The text was updated successfully, but these errors were encountered: