mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-23 19:00:43 +03:00
SubGhz: bug fixes (#1192)
* Subghz: fix simultaneous detection of Princeton and GateTx * SubGhz: fix phantom frequencies in the Frequency Analyzer
This commit is contained in:
parent
7017fa4f9e
commit
f4a205142d
@ -71,6 +71,7 @@ static int32_t subghz_frequency_analyzer_worker_thread(void* context) {
|
||||
furi_hal_subghz_load_preset(FuriHalSubGhzPresetOok650Async);
|
||||
furi_hal_subghz_set_frequency(433920000);
|
||||
furi_hal_subghz_flush_rx();
|
||||
furi_hal_subghz_set_path(FuriHalSubGhzPathIsolate);
|
||||
furi_hal_subghz_rx();
|
||||
|
||||
while(instance->worker_running) {
|
||||
|
@ -6,12 +6,6 @@
|
||||
#include "../blocks/generic.h"
|
||||
#include "../blocks/math.h"
|
||||
|
||||
/*
|
||||
* Help
|
||||
* https://phreakerclub.com/447
|
||||
*
|
||||
*/
|
||||
|
||||
#define TAG "SubGhzProtocolFirefly"
|
||||
|
||||
#define DIP_PATTERN "%c%c%c%c%c%c%c%c%c%c"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "../blocks/generic.h"
|
||||
#include "../blocks/math.h"
|
||||
|
||||
#define TAG "SubGhzProtocolkeeloq"
|
||||
#define TAG "SubGhzProtocolKeeloq"
|
||||
|
||||
static const SubGhzBlockConst subghz_protocol_keeloq_const = {
|
||||
.te_short = 400,
|
||||
|
@ -6,12 +6,6 @@
|
||||
#include "../blocks/generic.h"
|
||||
#include "../blocks/math.h"
|
||||
|
||||
/*
|
||||
* Help
|
||||
* https://phreakerclub.com/447
|
||||
*
|
||||
*/
|
||||
|
||||
#define TAG "SubGhzProtocolNeroSketch"
|
||||
|
||||
static const SubGhzBlockConst subghz_protocol_nero_sketch_const = {
|
||||
|
@ -5,12 +5,6 @@
|
||||
#include "../blocks/generic.h"
|
||||
#include "../blocks/math.h"
|
||||
|
||||
/*
|
||||
* Help
|
||||
* https://phreakerclub.com/447
|
||||
*
|
||||
*/
|
||||
|
||||
#define TAG "SubGhzProtocolNiceFLO"
|
||||
|
||||
static const SubGhzBlockConst subghz_protocol_nice_flo_const = {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "../blocks/encoder.h"
|
||||
#include "../blocks/generic.h"
|
||||
#include "../blocks/math.h"
|
||||
|
||||
/*
|
||||
* https://phreakerclub.com/1615
|
||||
* https://phreakerclub.com/forum/showthread.php?t=2360
|
||||
|
@ -12,7 +12,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define TAG "SubGhzProtocolCAME"
|
||||
#define TAG "SubGhzProtocolPrinceton"
|
||||
|
||||
static const SubGhzBlockConst subghz_protocol_princeton_const = {
|
||||
.te_short = 400,
|
||||
@ -28,6 +28,7 @@ struct SubGhzProtocolDecoderPrinceton {
|
||||
SubGhzBlockGeneric generic;
|
||||
|
||||
uint32_t te;
|
||||
uint32_t last_data;
|
||||
};
|
||||
|
||||
struct SubGhzProtocolEncoderPrinceton {
|
||||
@ -241,15 +242,18 @@ void subghz_protocol_decoder_princeton_feed(void* context, bool level, uint32_t
|
||||
instance->decoder.parser_step = PrincetonDecoderStepSaveDuration;
|
||||
if(instance->decoder.decode_count_bit ==
|
||||
subghz_protocol_princeton_const.min_count_bit_for_found) {
|
||||
instance->te /= (instance->decoder.decode_count_bit * 4 + 1);
|
||||
if(instance->last_data == instance->decoder.decode_data) {
|
||||
instance->te /= (instance->decoder.decode_count_bit * 4 + 1);
|
||||
|
||||
instance->generic.data = instance->decoder.decode_data;
|
||||
instance->generic.data_count_bit = instance->decoder.decode_count_bit;
|
||||
instance->generic.serial = instance->decoder.decode_data >> 4;
|
||||
instance->generic.btn = (uint8_t)instance->decoder.decode_data & 0x00000F;
|
||||
instance->generic.data = instance->decoder.decode_data;
|
||||
instance->generic.data_count_bit = instance->decoder.decode_count_bit;
|
||||
instance->generic.serial = instance->decoder.decode_data >> 4;
|
||||
instance->generic.btn = (uint8_t)instance->decoder.decode_data & 0x00000F;
|
||||
|
||||
if(instance->base.callback)
|
||||
instance->base.callback(&instance->base, instance->base.context);
|
||||
if(instance->base.callback)
|
||||
instance->base.callback(&instance->base, instance->base.context);
|
||||
}
|
||||
instance->last_data = instance->decoder.decode_data;
|
||||
}
|
||||
instance->decoder.decode_data = 0;
|
||||
instance->decoder.decode_count_bit = 0;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "furi_hal.h"
|
||||
#include "../blocks/math.h"
|
||||
|
||||
/*
|
||||
* Help
|
||||
* https://phreakerclub.com/447
|
||||
|
Loading…
Reference in New Issue
Block a user