Merge remote-tracking branch 'ofw/dev' into mntm-dev

This commit is contained in:
Willy-JL
2024-07-15 22:18:35 +01:00
466 changed files with 3282 additions and 3168 deletions

View File

@@ -2,6 +2,7 @@
#include <lib/subghz/subghz_tx_rx_worker.h>
#define TAG "SubGhzChat"
#define SUBGHZ_CHAT_WORKER_TIMEOUT_BETWEEN_MESSAGES 500
struct SubGhzChatWorker {

View File

@@ -3,6 +3,7 @@
#include <float_tools.h>
#define TAG "SubGhzThresholdRssi"
#define THRESHOLD_RSSI_LOW_COUNT 10
struct SubGhzThresholdRssi {

View File

@@ -542,22 +542,19 @@ SubGhzProtocolDecoderBase* subghz_txrx_get_decoder(SubGhzTxRx* instance) {
bool subghz_txrx_protocol_is_serializable(SubGhzTxRx* instance) {
furi_assert(instance);
return (
(instance->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
SubGhzProtocolFlag_Save);
return (instance->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
SubGhzProtocolFlag_Save;
}
bool subghz_txrx_protocol_is_transmittable(SubGhzTxRx* instance, bool check_type) {
furi_assert(instance);
const SubGhzProtocol* protocol = instance->decoder_result->protocol;
if(check_type) {
return (
((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
protocol->encoder->deserialize && protocol->type == SubGhzProtocolTypeStatic);
return ((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
protocol->encoder->deserialize && protocol->type == SubGhzProtocolTypeStatic;
}
return (
((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
protocol->encoder->deserialize);
return ((protocol->flag & SubGhzProtocolFlag_Send) == SubGhzProtocolFlag_Send) &&
protocol->encoder->deserialize;
}
void subghz_txrx_receiver_set_filter(SubGhzTxRx* instance, SubGhzProtocolFlag filter) {

View File

@@ -145,4 +145,4 @@ bool subghz_txrx_gen_secplus_v2_protocol(
bool subghz_txrx_gen_secplus_v1_protocol(
SubGhzTxRx* instance,
const char* name_preset,
uint32_t frequency);
uint32_t frequency);

View File

@@ -4,9 +4,10 @@
#include <lib/subghz/protocols/raw.h>
#include <toolbox/path.h>
#define RAW_FILE_NAME "RAW_"
#define TAG "SubGhzSceneReadRAW"
#define RAW_FILE_NAME "RAW_"
bool subghz_scene_read_raw_update_filename(SubGhz* subghz) {
bool ret = false;
//set the path to read the file

View File

@@ -4,8 +4,9 @@
#include <furi.h>
#define SUBGHZ_HISTORY_MAX 65535 // uint16_t index max, ram limit below
#define SUBGHZ_HISTORY_MAX 65535 // uint16_t index max, ram limit below
#define SUBGHZ_HISTORY_FREE_HEAP (10240 * (3 - MIN(rpc_get_sessions_count(instance->rpc), 2U)))
#define TAG "SubGhzHistory"
typedef struct {

View File

@@ -441,7 +441,7 @@ void subghz_unlock(SubGhz* subghz) {
bool subghz_is_locked(SubGhz* subghz) {
furi_assert(subghz);
return (subghz->lock == SubGhzLockOn);
return subghz->lock == SubGhzLockOn;
}
void subghz_rx_key_state_set(SubGhz* subghz, SubGhzRxKeyState state) {

View File

@@ -10,9 +10,9 @@
#include "subghz_read_raw.h"
#define FRAME_HEIGHT 12
#define MAX_LEN_PX 111
#define MENU_ITEMS 4u
#define UNLOCK_CNT 3
#define MAX_LEN_PX 111
#define MENU_ITEMS 4u
#define UNLOCK_CNT 3
#define FLIP_TIMEOUT (500)
@@ -190,7 +190,7 @@ void subghz_view_receiver_add_item_to_menu(
item_menu->item_str = furi_string_alloc_set(name);
item_menu->type = type;
item_menu->repeats = repeats;
if((model->idx == model->history_item - 1)) {
if(model->idx == model->history_item - 1) {
model->history_item++;
model->idx++;
subghz_view_receiver_show_time_moment(subghz_receiver);

View File

@@ -12,11 +12,11 @@
#define TAG "frequency_analyzer"
#define RSSI_MIN -97
#define RSSI_MAX -60
#define RSSI_SCALE 2.3
#define RSSI_MIN -97
#define RSSI_MAX -60
#define RSSI_SCALE 2.3
#define TRIGGER_STEP 1
#define MAX_HISTORY 4
#define MAX_HISTORY 4
static const uint32_t subghz_frequency_list[] = {
300000000, 302757000, 303875000, 303900000, 304250000, 307000000, 307500000, 307800000,

View File

@@ -6,9 +6,11 @@
#include <gui/elements.h>
#include <assets_icons.h>
#define SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE 100
#define TAG "SubGhzReadRaw"
#define SUBGHZ_READ_RAW_RSSI_HISTORY_SIZE 100
struct SubGhzReadRAW {
View* view;
SubGhzReadRAWCallback callback;