Skip to content
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

Clean up and add some database input #16

Merged
merged 4 commits into from
Dec 30, 2016
Merged

Conversation

jmg22
Copy link
Contributor

@jmg22 jmg22 commented Dec 29, 2016

some clean up and addition of (# coding: utf8) i hope this will help.

I change folder name to add rpi_

i add

  • air pressure to database (bmp085)
  • Orientation sensor calibration status and cuz acceleration (bno055)
  • more button setting like debuncing possibility

some bug correction.

some clean up and addition of (# coding: utf8) i hope this will help.

I change folder name to add rpi_

i add

-air pressure to database (bmp085)
-Orientation sensor calibration status and cuz acceleration (bno055)
- more button setting like debuncing possibility

some bug correction.
@neil-d95
Copy link
Contributor

neil-d95 commented Dec 29, 2016 via email

@jmg22
Copy link
Contributor Author

jmg22 commented Dec 29, 2016 via email

@neil-d95
Copy link
Contributor

neil-d95 commented Dec 29, 2016 via email

I think a doc are need to people wanted to use this plugins
@birkelbach
Copy link
Contributor

It would be cleaner to put the self.getout flag in the while loop. I'm not sure what I was thinking. For a simple loop it makes sense but if you had more than one place in the loop where you could bail out it would make more sense to use the break. I think that is what I was trying to do. It doesn't really matter.

Don't use the self.running flag as the signal to bail out though. That flag is used elsewhere in the plugin code to determine if the plugin is actually running or not. The last thing the plugin should do is set self.running to False. Otherwise it may create a race condition elsewhere. It could be a second or two between the setting of self.getout and the plugin's threads actually stopping.

Actually setting self.running to False in the plugin code may be redundant because it gets set to False in the base class' stop() method. I'll try to spend some time cleaning them up and making sure that skel.py reflects the changes.

The imports would be pretty low overhead. Python won't load the same module twice. sys and logger are in just about every other file so leaving them in and not using them won't make much difference. You should be using logger though. It'll make troubleshooting your plugins easier in the long run. :-)

@birkelbach birkelbach merged commit 7527ce8 into makerplane:develop Dec 30, 2016
@jmg22
Copy link
Contributor Author

jmg22 commented Jan 13, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants