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:
authorSkorpionm <85568270+Skorpionm@users.noreply.github.com>2021-12-22 14:05:14 +0300
committerGitHub <noreply@github.com>2021-12-22 14:05:14 +0300
commit51aa169c3b8424eb65dca6684fe20fdbaec92da4 (patch)
treeb2d0aefc17a37bc513f7cbe76be5599fb450a2d0 /applications/subghz/views
parentcdfc420ddf28f2bf7ad25491869a89ad9eb8b1f8 (diff)
[FL-2149] SubGhz: Additional frequencies for testing (#920)
* SubGhz: add new frequency for testing * [FL-2149] SubGhz: power reduction for Australia Co-authored-by: あく <alleteam@gmail.com>
Diffstat (limited to 'applications/subghz/views')
-rw-r--r--applications/subghz/views/subghz_test_carrier.c9
-rw-r--r--applications/subghz/views/subghz_test_packet.c11
-rw-r--r--applications/subghz/views/subghz_test_static.c14
3 files changed, 19 insertions, 15 deletions
diff --git a/applications/subghz/views/subghz_test_carrier.c b/applications/subghz/views/subghz_test_carrier.c
index a569db1f..97bfe42b 100644
--- a/applications/subghz/views/subghz_test_carrier.c
+++ b/applications/subghz/views/subghz_test_carrier.c
@@ -1,5 +1,6 @@
#include "subghz_test_carrier.h"
#include "../subghz_i.h"
+#include "../helpers/subghz_testing.h"
#include <math.h>
#include <furi.h>
@@ -94,7 +95,7 @@ bool subghz_test_carrier_input(InputEvent* event, void* context) {
if(event->key == InputKeyLeft) {
if(model->frequency > 0) model->frequency--;
} else if(event->key == InputKeyRight) {
- if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
+ if(model->frequency < subghz_frequencies_count_testing - 1) model->frequency++;
} else if(event->key == InputKeyDown) {
if(model->path > 0) model->path--;
} else if(event->key == InputKeyUp) {
@@ -108,7 +109,7 @@ bool subghz_test_carrier_input(InputEvent* event, void* context) {
}
model->real_frequency =
- furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
+ furi_hal_subghz_set_frequency(subghz_frequencies_testing[model->frequency]);
furi_hal_subghz_set_path(model->path);
if(model->status == SubghzTestCarrierModelStatusRx) {
@@ -141,9 +142,9 @@ void subghz_test_carrier_enter(void* context) {
with_view_model(
subghz_test_carrier->view, (SubghzTestCarrierModel * model) {
- model->frequency = subghz_frequencies_433_92; // 433
+ model->frequency = subghz_frequencies_433_92_testing; // 433
model->real_frequency =
- furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
+ furi_hal_subghz_set_frequency(subghz_frequencies_testing[model->frequency]);
model->path = FuriHalSubGhzPathIsolate; // isolate
model->rssi = 0.0f;
model->status = SubghzTestCarrierModelStatusRx;
diff --git a/applications/subghz/views/subghz_test_packet.c b/applications/subghz/views/subghz_test_packet.c
index 155d4f07..272c050e 100644
--- a/applications/subghz/views/subghz_test_packet.c
+++ b/applications/subghz/views/subghz_test_packet.c
@@ -1,5 +1,6 @@
#include "subghz_test_packet.h"
#include "../subghz_i.h"
+#include "../helpers/subghz_testing.h"
#include <math.h>
#include <furi.h>
@@ -144,7 +145,7 @@ static bool subghz_test_packet_input(InputEvent* event, void* context) {
if(event->key == InputKeyLeft) {
if(model->frequency > 0) model->frequency--;
} else if(event->key == InputKeyRight) {
- if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
+ if(model->frequency < subghz_frequencies_count_testing - 1) model->frequency++;
} else if(event->key == InputKeyDown) {
if(model->path > 0) model->path--;
} else if(event->key == InputKeyUp) {
@@ -158,7 +159,7 @@ static bool subghz_test_packet_input(InputEvent* event, void* context) {
}
model->real_frequency =
- furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
+ furi_hal_subghz_set_frequency(subghz_frequencies_testing[model->frequency]);
furi_hal_subghz_set_path(model->path);
if(model->status == SubghzTestPacketModelStatusRx) {
@@ -168,7 +169,7 @@ static bool subghz_test_packet_input(InputEvent* event, void* context) {
instance->encoder,
0x00AABBCC,
SUBGHZ_TEST_PACKET_COUNT,
- subghz_frequencies[model->frequency]);
+ subghz_frequencies_testing[model->frequency]);
if(!furi_hal_subghz_start_async_tx(
subghz_encoder_princeton_yield, instance->encoder)) {
model->status = SubghzTestPacketModelStatusOnlyRx;
@@ -191,9 +192,9 @@ void subghz_test_packet_enter(void* context) {
with_view_model(
instance->view, (SubghzTestPacketModel * model) {
- model->frequency = subghz_frequencies_433_92;
+ model->frequency = subghz_frequencies_433_92_testing;
model->real_frequency =
- furi_hal_subghz_set_frequency(subghz_frequencies[model->frequency]);
+ furi_hal_subghz_set_frequency(subghz_frequencies_testing[model->frequency]);
model->path = FuriHalSubGhzPathIsolate; // isolate
model->rssi = 0.0f;
model->status = SubghzTestPacketModelStatusRx;
diff --git a/applications/subghz/views/subghz_test_static.c b/applications/subghz/views/subghz_test_static.c
index 9e924a3f..518ccb36 100644
--- a/applications/subghz/views/subghz_test_static.c
+++ b/applications/subghz/views/subghz_test_static.c
@@ -1,5 +1,6 @@
#include "subghz_test_static.h"
#include "../subghz_i.h"
+#include "../helpers/subghz_testing.h"
#include <math.h>
#include <furi.h>
@@ -81,7 +82,7 @@ bool subghz_test_static_input(InputEvent* event, void* context) {
if(event->key == InputKeyLeft) {
if(model->frequency > 0) model->frequency--;
} else if(event->key == InputKeyRight) {
- if(model->frequency < subghz_frequencies_count - 1) model->frequency++;
+ if(model->frequency < subghz_frequencies_count_testing - 1) model->frequency++;
} else if(event->key == InputKeyDown) {
if(model->button > 0) model->button--;
} else if(event->key == InputKeyUp) {
@@ -89,13 +90,14 @@ bool subghz_test_static_input(InputEvent* event, void* context) {
}
}
- model->real_frequency = subghz_frequencies[model->frequency];
+ model->real_frequency = subghz_frequencies_testing[model->frequency];
if(event->key == InputKeyOk) {
NotificationApp* notification = furi_record_open("notification");
if(event->type == InputTypePress) {
furi_hal_subghz_idle();
- furi_hal_subghz_set_frequency_and_path(subghz_frequencies[model->frequency]);
+ furi_hal_subghz_set_frequency_and_path(
+ subghz_frequencies_testing[model->frequency]);
if(!furi_hal_subghz_tx()) {
instance->callback(SubghzTestStaticEventOnlyRx, instance->context);
} else {
@@ -107,7 +109,7 @@ bool subghz_test_static_input(InputEvent* event, void* context) {
instance->encoder,
subghz_test_static_keys[model->button],
10000,
- subghz_frequencies[model->frequency]);
+ subghz_frequencies_testing[model->frequency]);
furi_hal_subghz_start_async_tx(
subghz_encoder_princeton_yield, instance->encoder);
@@ -145,8 +147,8 @@ void subghz_test_static_enter(void* context) {
with_view_model(
instance->view, (SubghzTestStaticModel * model) {
- model->frequency = subghz_frequencies_433_92;
- model->real_frequency = subghz_frequencies[model->frequency];
+ model->frequency = subghz_frequencies_433_92_testing;
+ model->real_frequency = subghz_frequencies_testing[model->frequency];
model->button = 0;
return true;