SubGhz: support for custom frequencies for SubGhz (#1108)

* SubGhz: add load setting
* SubGhz: add support file upload with custom frequencies
* SubGhz: add load region setting
* SubGhz: fix syntax
* SubGhz: fix furi_halt error
* Desktop: hide dolphin controls in production build
* Notification: fix crash on NotificationMessageTypeLedDisplayUnlock message

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Skorpionm
2022-04-14 18:05:40 +04:00
committed by GitHub
parent 8cc3fd579c
commit a5cc3453c8
15 changed files with 511 additions and 109 deletions

View File

@@ -164,7 +164,6 @@ void notification_process_notification_message(
notification_message = (*message->sequence)[notification_message_index];
bool led_active = false;
uint8_t display_led_lock = 0;
uint8_t led_values[NOTIFICATION_LED_COUNT] = {0x00, 0x00, 0x00};
bool reset_notifications = true;
float speaker_volume_setting = app->settings.speaker_volume;
@@ -192,18 +191,18 @@ void notification_process_notification_message(
reset_mask |= reset_display_mask;
break;
case NotificationMessageTypeLedDisplayLock:
furi_assert(display_led_lock < UINT8_MAX);
display_led_lock++;
if(display_led_lock == 1) {
furi_assert(app->display_led_lock < UINT8_MAX);
app->display_led_lock++;
if(app->display_led_lock == 1) {
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting);
}
break;
case NotificationMessageTypeLedDisplayUnlock:
furi_assert(display_led_lock > 0);
display_led_lock--;
if(display_led_lock == 0) {
furi_assert(app->display_led_lock > 0);
app->display_led_lock--;
if(app->display_led_lock == 0) {
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting);

View File

@@ -49,6 +49,7 @@ struct NotificationApp {
NotificationLedLayer display;
NotificationLedLayer led[NOTIFICATION_LED_COUNT];
uint8_t display_led_lock;
NotificationSettings settings;
};