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

Improved gpio handling for buttons and status LEDs #230

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

MuratUrsavas
Copy link
Contributor

Issue

#172

How
If a user button or status led definition is missing in a variant definition, that part of the code is passed gracefully now.

Checklist

  • Tests added
  • Cleaned up commit history (rebase!)
  • Documentation added
  • Thought about variable and method names

@MuratUrsavas MuratUrsavas requested a review from a team as a code owner January 18, 2023 18:16
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@shawaj
Copy link
Member

shawaj commented Jan 18, 2023

@MuratUrsavas in hm-pyhelper would we put:
'STATUS': False, and 'BUTTON': False, if they didn't exist? Or just leave them out entirely?

Or is either ok?

@MuratUrsavas
Copy link
Contributor Author

MuratUrsavas commented Jan 18, 2023

@shawaj We have to leave them out as otherwise it would return something (False), and it would break current code and give exceptions. It depends on missing keys.

@shawaj
Copy link
Member

shawaj commented Jan 18, 2023

@shawaj We have to leave them out as otherwise it would return something (False), and it would break current code and give exceptions. It depends on missing keys.

Ok perfect. So we just leave them out of pyhelper if no button or LED. Nice 👍

@shawaj
Copy link
Member

shawaj commented Jan 18, 2023

I'll put a note on that repo to update the readme to reflect that NebraLtd/hm-pyhelper#211

self.user_button.start()
self.status_led = MraaLED(self.get_status_led_pin())
btn = self.get_button_pin()
if btn is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if btn:
would have been the same.

shawaj added a commit to NebraLtd/helium-miner-software that referenced this pull request Feb 1, 2023
- improved styling to match dashboard on diagnostics NebraLtd/hm-diag#471
- config improved gpio handling NebraLtd/hm-config#230
- bump all containers and versions
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.

4 participants