forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds led indicator to emulation window which shows a different colour if when delaying to when its emulating - Adds setting letting you disable it
- Loading branch information
Showing
8 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,8 @@ App( | |
Lib( | ||
name="worker", | ||
), | ||
Lib( | ||
name="led", | ||
), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#include "nfc_playlist_led.h" | ||
|
||
NotificationMessage blink_message_normal = { | ||
.type = NotificationMessageTypeLedBlinkStart, | ||
.data.led_blink.color = LightBlue | LightGreen, | ||
.data.led_blink.on_time = 10, | ||
.data.led_blink.period = 100, | ||
}; | ||
const NotificationSequence blink_sequence_normal = { | ||
&blink_message_normal, | ||
&message_do_not_reset, | ||
NULL, | ||
}; | ||
void start_normal_blink(NfcPlaylist* nfc_playlist) { | ||
if (nfc_playlist->emulate_led_indicator) { | ||
notification_message_block(nfc_playlist->notification, &blink_sequence_normal); | ||
} | ||
} | ||
|
||
NotificationMessage blink_message_error = { | ||
.type = NotificationMessageTypeLedBlinkStart, | ||
.data.led_blink.color = LightRed, | ||
.data.led_blink.on_time = 10, | ||
.data.led_blink.period = 100, | ||
}; | ||
const NotificationSequence blink_sequence_error = { | ||
&blink_message_error, | ||
&message_do_not_reset, | ||
NULL, | ||
}; | ||
void start_error_blink(NfcPlaylist* nfc_playlist) { | ||
if (nfc_playlist->emulate_led_indicator) { | ||
notification_message_block(nfc_playlist->notification, &blink_sequence_error); | ||
} | ||
} | ||
|
||
void stop_blink(NfcPlaylist* nfc_playlist) { | ||
if (nfc_playlist->emulate_led_indicator) { | ||
notification_message_block(nfc_playlist->notification, &sequence_blink_stop); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
#include <../../nfc_playlist.h> | ||
#include <notification/notification_messages.h> | ||
|
||
void start_normal_blink(NfcPlaylist* nfc_playlist); | ||
void start_error_blink(NfcPlaylist* nfc_playlist); | ||
void stop_blink(NfcPlaylist* nfc_playlist); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters