Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Minaylov <nm29719@gmail.com>2022-04-28 20:20:59 +0300
committerGitHub <noreply@github.com>2022-04-28 20:20:59 +0300
commit4526503d818d8a628598fe60f13b143f1a0b4116 (patch)
treea3c71603b7dbac892f53b0bcf2f342f054d7bc33 /applications/subghz/views
parentaf5e03ecb7123286116de685faf86c66c18a60d7 (diff)
[FL-2456] App notifications update (#1175)
* Notifications update: SubGHz * Notifications: ibutton, infrared, rfid
Diffstat (limited to 'applications/subghz/views')
-rw-r--r--applications/subghz/views/subghz_frequency_analyzer.c12
-rw-r--r--applications/subghz/views/subghz_read_raw.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/applications/subghz/views/subghz_frequency_analyzer.c b/applications/subghz/views/subghz_frequency_analyzer.c
index 4e645edb..ec3c5ee9 100644
--- a/applications/subghz/views/subghz_frequency_analyzer.c
+++ b/applications/subghz/views/subghz_frequency_analyzer.c
@@ -19,6 +19,7 @@ struct SubGhzFrequencyAnalyzer {
SubGhzFrequencyAnalyzerWorker* worker;
SubGhzFrequencyAnalyzerCallback callback;
void* context;
+ bool locked;
};
typedef struct {
@@ -86,6 +87,17 @@ bool subghz_frequency_analyzer_input(InputEvent* event, void* context) {
void subghz_frequency_analyzer_pair_callback(void* context, uint32_t frequency, float rssi) {
SubGhzFrequencyAnalyzer* instance = context;
+ if((rssi == 0.f) && (instance->locked)) {
+ if(instance->callback) {
+ instance->callback(SubGhzCustomEventSceneAnalyzerUnlock, instance->context);
+ }
+ } else if((rssi != 0.f) && (!instance->locked)) {
+ if(instance->callback) {
+ instance->callback(SubGhzCustomEventSceneAnalyzerLock, instance->context);
+ }
+ }
+
+ instance->locked = (rssi != 0.f);
with_view_model(
instance->view, (SubGhzFrequencyAnalyzerModel * model) {
model->rssi = rssi;
diff --git a/applications/subghz/views/subghz_read_raw.c b/applications/subghz/views/subghz_read_raw.c
index bf6abc8c..ff3ba45a 100644
--- a/applications/subghz/views/subghz_read_raw.c
+++ b/applications/subghz/views/subghz_read_raw.c
@@ -293,7 +293,6 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
case SubGhzReadRAWStatusIDLE:
// Start TX
instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context);
- instance->callback(SubGhzCustomEventViewReadRAWVibro, instance->context);
model->satus = SubGhzReadRAWStatusTXRepeat;
ret = true;
break;
@@ -304,7 +303,6 @@ bool subghz_read_raw_input(InputEvent* event, void* context) {
case SubGhzReadRAWStatusLoadKeyIDLE:
// Start Load Key TX
instance->callback(SubGhzCustomEventViewReadRAWSendStart, instance->context);
- instance->callback(SubGhzCustomEventViewReadRAWVibro, instance->context);
model->satus = SubGhzReadRAWStatusLoadKeyTXRepeat;
ret = true;
break;