[FL-1237] Notifications app (#476)
* Notification app: init * Notification app: separate message sequences * Notification app: rename notifications to notification * Notification app: rework api * Notification app: new sequences for charger * Power app: add state for better led handling * Power app: NotificationSequence type, notification led process * Blink app: use notifications * Notification app: sound and vibro notifications * Notification app: note messages * Notification app: more messages * Notification app: update note message generator * Blink app: fix state counter * Notification app: fix delay event * App sd-filesystem: notifications * App notifications: headers c++ compatibility * App notifications: Cmaj success chord sequence * App iButton: use notifications * App notification: display backlight notifications * App notification: add "display on" message to success and error sequences * App accessor: use notifications * App ibutton: guard onewire key read * Lib-RFAL: remove api_hal_light usage * App notification: add blocking mode, rework display api * Cli led command: use internal notification instead of direc access to leds. * App unit test: use notifications * App lfrfid: use notifications * Apps: close notification record * App subghz: rough use of notifications * App notificaton: ignore reset flag * App strobe: removed * Lib irda decoder: fix nec decoding * App irda: fix assert, use notifications * Apps: use notifications * Fix IRDA tests * Cli: better var naming * App notification: readable sources Co-authored-by: Albert Kharisov <albert@flipperdevices.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <furi.h>
|
||||
#include <api-hal.h>
|
||||
#include <input/input.h>
|
||||
#include <notification/notification-messages.h>
|
||||
|
||||
static const uint8_t subghz_static_keys[][4] = {
|
||||
{0x74, 0xBA, 0xDE},
|
||||
@@ -105,7 +106,8 @@ bool subghz_static_input(InputEvent* event, void* context) {
|
||||
if(event->type == InputTypePress) {
|
||||
const uint8_t* key = subghz_static_keys[model->button];
|
||||
|
||||
api_hal_light_set(LightRed, 0xff);
|
||||
NotificationApp* notification = furi_record_open("notification");
|
||||
notification_message_block(notification, &sequence_set_red_255);
|
||||
__disable_irq();
|
||||
for(uint8_t r = 0; r < 20; r++) {
|
||||
//Payload
|
||||
@@ -127,7 +129,8 @@ bool subghz_static_input(InputEvent* event, void* context) {
|
||||
delay_us(10600);
|
||||
}
|
||||
__enable_irq();
|
||||
api_hal_light_set(LightRed, 0x00);
|
||||
notification_message(notification, &sequence_reset_red);
|
||||
furi_record_close("notification");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user