New LF-RFID app (#534)

* Hal lfrfid: add read timer pulse and period config fns
* New debug application for lfrfid subsystem
* New lfrfid: app, fix naming
* App lfrfid: assets
* Container view module
* App ibutton: remove unused header
* App lfrfid scenes
* App notification, add yield to blocking operations, add speaker volume control
* App lfrfid: reading key scene
* Assets: placeholder icon
* App lfrfid: reworked container view module
* App lfrfid: new scenes
* App lfrfid: write scene
* App lfrfid: write hid
* App lfrfid: emulate scene
* App lfrfid: save name scene
* App lfrfid: add missing file
This commit is contained in:
SG
2021-06-29 00:42:30 +10:00
committed by GitHub
parent 5d746234e9
commit 22e1ecb642
141 changed files with 2504 additions and 1666 deletions

View File

@@ -22,6 +22,7 @@ void notification_message_block(NotificationApp* app, const NotificationSequence
.sequence = sequence,
.back_event = osEventFlagsNew(NULL)};
furi_check(osMessageQueuePut(app->queue, &m, 0, osWaitForever) == osOK);
osThreadYield();
osEventFlagsWait(m.back_event, NOTIFICATION_EVENT_COMPLETE, osFlagsWaitAny, osWaitForever);
osEventFlagsDelete(m.back_event);
};
@@ -32,6 +33,7 @@ void notification_internal_message_block(
NotificationAppMessage m = {
.type = InternalLayerMessage, .sequence = sequence, .back_event = osEventFlagsNew(NULL)};
furi_check(osMessageQueuePut(app->queue, &m, 0, osWaitForever) == osOK);
osThreadYield();
osEventFlagsWait(m.back_event, NOTIFICATION_EVENT_COMPLETE, osFlagsWaitAny, osWaitForever);
osEventFlagsDelete(m.back_event);
};

View File

@@ -205,7 +205,8 @@ void notification_process_notification_message(
break;
case NotificationMessageTypeSoundOn:
notification_sound_on(
notification_message->data.sound.pwm, notification_message->data.sound.frequency);
notification_message->data.sound.pwm * app->settings.speaker_volume,
notification_message->data.sound.frequency);
reset_mask |= reset_sound_mask;
break;
case NotificationMessageTypeSoundOff:
@@ -314,6 +315,7 @@ static NotificationApp* notification_app_alloc() {
app->queue = osMessageQueueNew(8, sizeof(NotificationAppMessage), NULL);
app->display_timer = osTimerNew(notification_display_timer, osTimerOnce, app, NULL);
app->settings.speaker_volume = 1.0f;
app->settings.display_brightness = 1.0f;
app->settings.led_brightness = 1.0f;
app->settings.display_off_delay_ms = 30000;

View File

@@ -32,6 +32,7 @@ typedef struct {
typedef struct {
float display_brightness;
float led_brightness;
float speaker_volume;
uint32_t display_off_delay_ms;
} NotificationSettings;

View File

@@ -255,6 +255,13 @@ const NotificationSequence sequence_blink_yellow_10 = {
NULL,
};
const NotificationSequence sequence_blink_cyan_10 = {
&message_green_255,
&message_blue_255,
&message_delay_10,
NULL,
};
const NotificationSequence sequence_blink_red_100 = {
&message_red_255,
&message_delay_100,

View File

@@ -78,6 +78,7 @@ extern const NotificationSequence sequence_blink_blue_10;
extern const NotificationSequence sequence_blink_red_10;
extern const NotificationSequence sequence_blink_green_10;
extern const NotificationSequence sequence_blink_yellow_10;
extern const NotificationSequence sequence_blink_cyan_10;
extern const NotificationSequence sequence_blink_red_100;
extern const NotificationSequence sequence_blink_green_100;