cli: Buzzer command (#4006)

* Add args_read_float_and_trim function

* Add args_read_duration function

* Add notes_frequency_from_name function

* Add cli_sleep function and sleep CLI command

* Update CLI top command to use cli_sleep

* Add buzzer CLI command

* toolbox: make args_read_duration less convoluted

* notification: make notification_messages_notes_frequency_from_name less convoluted

* unit_tests: better float checking

* fix formatting and f18

---------

Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
Ivan Barsukov
2025-09-29 20:53:10 +03:00
committed by GitHub
parent f78a8328d1
commit 1e0f3a606f
15 changed files with 747 additions and 23 deletions

View File

@@ -115,6 +115,17 @@ extern const NotificationMessage message_note_a8;
extern const NotificationMessage message_note_as8;
extern const NotificationMessage message_note_b8;
/**
* @brief Returns the frequency of the given note
*
* This function calculates and returns the frequency (in Hz) of the specified note.
* If the input note name is invalid, the function returns 0.0.
*
* @param [in] 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 notification_messages_notes_frequency_from_name(const char* note_name);
#ifdef __cplusplus
}
#endif