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

Should Bluetooth led take precedence over error? #187

Open
shawaj opened this issue Apr 7, 2022 · 6 comments
Open

Should Bluetooth led take precedence over error? #187

shawaj opened this issue Apr 7, 2022 · 6 comments

Comments

@shawaj
Copy link
Member

shawaj commented Apr 7, 2022

Here I think the error LED takes precedence over the Bluetooth advertisement:

if is_raspberry_pi() or is_rockpi():
while True:
# Blink fast if diagnostics are not OK
if(not self.shared_state.are_diagnostics_ok):
self.status_led.blink(0.1, 0.1, 10, False)
# Blink slow if advertising bluetooth
elif(self.shared_state.is_advertising_bluetooth):
self.status_led.blink(1, 1, 1, False)
# Solid if diagnostics are OK and not advertising
else:
self.status_led.on()
sleep(LED_REFRESH_SECONDS)

I wonder if this should be the other way around? Not sure what you think @KevinWassermann94

@KevinWassermann94
Copy link
Contributor

Yeah, it should definetly be the other way around

@shawaj
Copy link
Member Author

shawaj commented Apr 8, 2022

@marvinmarnold reckon we can change this?

@marvinmarnold
Copy link
Contributor

Yea, reasonable change. We are also not using the concept of PF much anymore generally.

@shawaj
Copy link
Member Author

shawaj commented Apr 9, 2022

@marvinmarnold do you think we should just get rid of PF here and move to checking the necessary diagnostics directly for the LED status?

@marvinmarnold
Copy link
Contributor

I think they are different tickets. Bluetooth should take precedence regardless. Should also reconsider what the necessary diagnostics are. They should prob be things that impact earnings:

  • Internet connected? (not just E0 or W0)
  • Miner running? (not just ECC)
  • Lora running? (LOR is fine)

Related to: https://github.com/NebraLtd/product-management/issues/29

@shawaj
Copy link
Member Author

shawaj commented Apr 9, 2022

Good point. I'll do a PR now and open a new ticket

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

No branches or pull requests

3 participants