-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Buzzer cli command #4006
base: dev
Are you sure you want to change the base?
Buzzer cli command #4006
Conversation
768c5c4
to
3645dd1
Compare
@@ -97,3 +116,75 @@ bool args_read_hex_bytes(FuriString* args, uint8_t* bytes, size_t bytes_count) { | |||
|
|||
return result; | |||
} | |||
|
|||
bool args_read_time(FuriString* args, uint32_t* value, const char* default_unit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like time
is not a right word, duration
maybe? It will be nice to take a look into other standard libraries and pick common term for the thing.
* @param note_name The name of the note (e.g., "A4", cs5") | ||
* @return The frequency of the note in Hz, or 0.0 if the note name is invalid | ||
*/ | ||
extern float note_frequency(const char* note_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function naming. See coding convention for details.
@@ -525,6 +658,7 @@ void cli_commands_init(Cli* cli) { | |||
|
|||
cli_add_command(cli, "vibro", CliCommandFlagDefault, cli_command_vibro, NULL); | |||
cli_add_command(cli, "led", CliCommandFlagDefault, cli_command_led, NULL); | |||
cli_add_command(cli, "buzzer", CliCommandFlagDefault, cli_command_buzzer, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We kinda low on free flash memory, adding this feature directly into firmware looks kinda bad.
There is a chance that we will postpone this PR till @portasynthinca3 finish cli refactoring, so we can move non essential things into external apps.
Un-draft when ready |
What's new
buzzer
cli commandVerification
buzzer freq 659
orbuzzer note e5
for playing e5 for 100 ms (default value)buzzer freq 659 5s
orbuzzer note e5 5s
for playing e5 for 5 sbuzzer freq 659 0
orbuzzer note e5 0
for playing e5 in background and thenbuzzer off
to turn it offChecklist (For Reviewer)