[FL-2718, FL-2719] SubGhz: add protocol BERNER / ELKA / TEDSEN / TELETASTER / Doitrand / Marantec / Phoenix V2 (static mode) / Phox (static mode), fix Princeton (#1516)
* SubGhz: add protocol marantec * SubGhz: add protocol BERNER / ELKA / TEDSEN / TELETASTER * SubGhz: add protocol Doitrand * SubGhz: delete debug * SubGhz: add protocol Phoenix V2 (static mode) * SubGhz: fix serial decode Phoenix V2 * SubGhz: fix Princeton, display serial number and button on boot * SubGhz: fix Bett decoder and fix unit_test * SubGhz: update test_random_raw for unit_test Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -256,8 +256,6 @@ void subghz_protocol_decoder_princeton_feed(void* context, bool level, uint32_t
|
||||
|
||||
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);
|
||||
@@ -295,6 +293,15 @@ void subghz_protocol_decoder_princeton_feed(void* context, bool level, uint32_t
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Analysis of received data
|
||||
* @param instance Pointer to a SubGhzBlockGeneric* instance
|
||||
*/
|
||||
static void subghz_protocol_princeton_check_remote_controller(SubGhzBlockGeneric* instance) {
|
||||
instance->serial = instance->data >> 4;
|
||||
instance->btn = instance->data & 0xF;
|
||||
}
|
||||
|
||||
uint8_t subghz_protocol_decoder_princeton_get_hash_data(void* context) {
|
||||
furi_assert(context);
|
||||
SubGhzProtocolDecoderPrinceton* instance = context;
|
||||
@@ -347,25 +354,21 @@ bool subghz_protocol_decoder_princeton_deserialize(void* context, FlipperFormat*
|
||||
void subghz_protocol_decoder_princeton_get_string(void* context, string_t output) {
|
||||
furi_assert(context);
|
||||
SubGhzProtocolDecoderPrinceton* instance = context;
|
||||
|
||||
uint32_t code_found_lo = instance->generic.data & 0x00000000ffffffff;
|
||||
|
||||
uint64_t code_found_reverse = subghz_protocol_blocks_reverse_key(
|
||||
subghz_protocol_princeton_check_remote_controller(&instance->generic);
|
||||
uint32_t data_rev = subghz_protocol_blocks_reverse_key(
|
||||
instance->generic.data, instance->generic.data_count_bit);
|
||||
|
||||
uint32_t code_found_reverse_lo = code_found_reverse & 0x00000000ffffffff;
|
||||
|
||||
string_cat_printf(
|
||||
output,
|
||||
"%s %dbit\r\n"
|
||||
"Key:0x%08lX\r\n"
|
||||
"Yek:0x%08lX\r\n"
|
||||
"Sn:0x%05lX BTN:%02X\r\n"
|
||||
"Sn:0x%05lX Btn:%01X\r\n"
|
||||
"Te:%dus\r\n",
|
||||
instance->generic.protocol_name,
|
||||
instance->generic.data_count_bit,
|
||||
code_found_lo,
|
||||
code_found_reverse_lo,
|
||||
(uint32_t)(instance->generic.data & 0xFFFFFF),
|
||||
data_rev,
|
||||
instance->generic.serial,
|
||||
instance->generic.btn,
|
||||
instance->te);
|
||||
|
Reference in New Issue
Block a user