mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
IR: Add Onn Roku TV control to universal remote (#4201)
* added ONN brand roku TV to ir lib * pvs: fixed warning --------- Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -4833,3 +4833,29 @@ type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 590 412 592 4026 593 5030 593 412 592 4025 594 5029 594 412 616 4002 618 5003 593 439 564 4027 592 439 564 4029 590 5033 590 5035 588 440 563
|
||||
#
|
||||
# Model: ONN Roku TV
|
||||
#
|
||||
name: Vol_dn
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: EA C7 00 00
|
||||
command: 10 EF 00 00
|
||||
#
|
||||
name: Vol_up
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: EA C7 00 00
|
||||
command: 0F F0 00 00
|
||||
#
|
||||
name: Mute
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: EA C7 00 00
|
||||
command: 20 DF 00 00
|
||||
#
|
||||
name: Power
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: EA C7 00 00
|
||||
command: 17 E8 00 00
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user