1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

Merge remote-tracking branch 'OFW/dev' into dev

This commit is contained in:
MX
2025-09-30 19:08:21 +03:00

View File

@@ -1,5 +1,6 @@
#include "../cli_main_commands.h"
#include <notification/notification_app.h>
#include <math.h>
#include <toolbox/args.h>
#include <toolbox/cli/cli_command.h>
@@ -13,6 +14,9 @@ void cli_command_buzzer_print_usage(bool is_freq_subcommand, FuriString* args) {
}
}
// Consider volume effectively zero if below this threshold
#define BUZZER_VOLUME_EPSILON (1e-3f)
float cli_command_buzzer_read_frequency(bool is_freq_subcommand, FuriString* args) {
float frequency = 0.0f;
@@ -111,7 +115,7 @@ void execute(PipeSide* pipe, FuriString* args, void* context) {
printf("Flipper is in stealth mode. Unmute the device to control buzzer.");
break;
}
if(notification->settings.speaker_volume == 0.0f) {
if(fabsf(notification->settings.speaker_volume) < BUZZER_VOLUME_EPSILON) {
printf("Sound is disabled in settings. Increase volume to control buzzer.");
break;
}