[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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user