Skip to content

Conversation

@nakoeppen
Copy link
Contributor

This PR vastly improves buzzer controls for devices like the RAK WisMesh Tag and the T1000-E. Initially implemented as #1437, this expands on that to allow for the previously used master buzzer disable boolean AND a disable-on-serial boolean, both packed into the preexisting buzzer_quiet integer variable. Currently, I kept it so that three button clicks will only toggle the master buzzer disable, meaning that the disable-on-serial functionality will rely solely on the client app side of things.

On the technical side of things, Bit 0 is the master disable and Bit 1 is the serial disable. This means that:

  • If buzzer_quiet = 0 (00 in binary), the speaker will never be disabled
  • If buzzer_quiet = 1 (01 in binary), the speaker will always be disabled
  • If buzzer_quiet = 2 (10 in binary), the speaker will only be disabled when connected to serial
  • If buzzer_quiet = 3 (11 in binary), the speaker will always be disabled, with the serial disable also enabled

I have a different toggle mechanism which I have implemented but left commented out for now within UITask.cpp in the ui-new folder. This helps with testing since the client app has not implemented this functionality yet (buzzer will briefly beep when buzzer_quiet is set to zero, which helps to determine which setting you are on). If the community prefers the commented out toggle method as a means to swap, I would be happy to build on that.

@liamcottle @oltaco, I appreciated your opinions on the inital PR I had. Please feel free to let me know if anything needs to be adjusted here to maximize user accessibility. Pretty new to contributing to this project (and frankly open-source projects overall), but I certainly hope to be able to contribute more! Otherwise, this was tested successfully using the aforementioned commented out method on my WisMesh Tag.

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.

1 participant