SubGhz: fix incorrect response in rpc mode. Code cleanup. (#1964)
* Code cleanup * SubGhz: correct logic in RPC * SubGhz: do not blink on app rpc fail Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ static bool pin_name_to_int(FuriString* pin_name, size_t* result) {
|
||||
bool debug = furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug);
|
||||
for(size_t i = 0; i < COUNT_OF(cli_command_gpio_pins); i++) {
|
||||
if(!furi_string_cmp(pin_name, cli_command_gpio_pins[i].name)) {
|
||||
if(!cli_command_gpio_pins[i].debug || (cli_command_gpio_pins[i].debug && debug)) {
|
||||
if(!cli_command_gpio_pins[i].debug || debug) {
|
||||
*result = i;
|
||||
found = true;
|
||||
break;
|
||||
@@ -55,7 +55,7 @@ static void gpio_print_pins(void) {
|
||||
printf("Wrong pin name. Available pins: ");
|
||||
bool debug = furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug);
|
||||
for(size_t i = 0; i < COUNT_OF(cli_command_gpio_pins); i++) {
|
||||
if(!cli_command_gpio_pins[i].debug || (cli_command_gpio_pins[i].debug && debug)) {
|
||||
if(!cli_command_gpio_pins[i].debug || debug) {
|
||||
printf("%s ", cli_command_gpio_pins[i].name);
|
||||
}
|
||||
}
|
||||
|
@@ -160,7 +160,7 @@ static bool desktop_view_locked_input(InputEvent* event, void* context) {
|
||||
view_commit_model(locked_view->view, is_changed);
|
||||
|
||||
if(view_state == DesktopViewLockedStateUnlocked) {
|
||||
return view_state != DesktopViewLockedStateUnlocked;
|
||||
return false;
|
||||
} else if(view_state == DesktopViewLockedStateLocked && pin_locked) {
|
||||
locked_view->callback(DesktopLockedEventShowPinInput, locked_view->context);
|
||||
} else if(
|
||||
|
@@ -304,8 +304,7 @@ void view_dispatcher_handle_custom_event(ViewDispatcher* view_dispatcher, uint32
|
||||
}
|
||||
// If custom event is not consumed in View, call callback
|
||||
if(!is_consumed && view_dispatcher->custom_event_callback) {
|
||||
is_consumed =
|
||||
view_dispatcher->custom_event_callback(view_dispatcher->event_context, event);
|
||||
view_dispatcher->custom_event_callback(view_dispatcher->event_context, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ static const uint8_t reset_blink_mask = 1 << 6;
|
||||
|
||||
void notification_vibro_on();
|
||||
void notification_vibro_off();
|
||||
void notification_sound_on(float pwm, float freq);
|
||||
void notification_sound_on(float freq, float volume);
|
||||
void notification_sound_off();
|
||||
|
||||
uint8_t notification_settings_get_display_brightness(NotificationApp* app, uint8_t value);
|
||||
|
Reference in New Issue
Block a user