mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge remote-tracking branch 'ul/dev' into mntm-dev --nobuild
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
- UL: Marantec protocol implement CRC verification display and add manually support (by @xMasterX & @li0ard, original code by @Skorpionm)
|
- UL: Marantec protocol implement CRC verification display and add manually support (by @xMasterX & @li0ard, original code by @Skorpionm)
|
||||||
- UL: Keeloq Comunello add manually support (by @xMasterX)
|
- UL: Keeloq Comunello add manually support (by @xMasterX)
|
||||||
- UL: Add variant of 'Add Manually' menu with manual editing for each value (by @MrLego8-9)
|
- UL: Add variant of 'Add Manually' menu with manual editing for each value (by @MrLego8-9)
|
||||||
|
- UL: Add ZKTeco 430.5 MHz add manually support (by @xMasterX)
|
||||||
- RFID: Support writing Securakey, Jablotron and FDX-B to EM4305 cards (#434 by @jamisonderek)
|
- RFID: Support writing Securakey, Jablotron and FDX-B to EM4305 cards (#434 by @jamisonderek)
|
||||||
- BT Remote: Add Rename Option, simplify Bad KB BLE profile (#439 by @aaronjamt & @WillyJL)
|
- BT Remote: Add Rename Option, simplify Bad KB BLE profile (#439 by @aaronjamt & @WillyJL)
|
||||||
- MNTM Settings:
|
- MNTM Settings:
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
- Sub-GHz:
|
- Sub-GHz:
|
||||||
- UL: Add 868.46 MHz to default subghz freqs list (by @xMasterX)
|
- UL: Add 868.46 MHz to default subghz freqs list (by @xMasterX)
|
||||||
- UL: Reduce less popular freqs in default hopper preset, make it faster (by @xMasterX)
|
- UL: Reduce less popular freqs in default hopper preset, make it faster (by @xMasterX)
|
||||||
|
- UL: Tune Linear (add better EZCode support), Dickert MAHS decoders (by @xMasterX)
|
||||||
- JS: Expose button event type in `gui/widget` button callback (by @WillyJL)
|
- JS: Expose button event type in `gui/widget` button callback (by @WillyJL)
|
||||||
- UL: Docs: Update Sub-GHz DoorHan programming instructions (by @li0ard)
|
- UL: Docs: Update Sub-GHz DoorHan programming instructions (by @li0ard)
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ typedef enum {
|
|||||||
SetTypeCAMESpace,
|
SetTypeCAMESpace,
|
||||||
SetTypePricenton315,
|
SetTypePricenton315,
|
||||||
SetTypePricenton433,
|
SetTypePricenton433,
|
||||||
|
SetTypeZKTeco430,
|
||||||
SetTypeBETT_433,
|
SetTypeBETT_433,
|
||||||
SetTypeGangQi_433,
|
SetTypeGangQi_433,
|
||||||
SetTypeHollarm_433,
|
SetTypeHollarm_433,
|
||||||
|
|||||||
@@ -38,6 +38,16 @@ void subghz_scene_set_type_fill_generation_infos(GenInfo* infos_dest, SetType ty
|
|||||||
.data.bits = 24,
|
.data.bits = 24,
|
||||||
.data.te = 400};
|
.data.te = 400};
|
||||||
break;
|
break;
|
||||||
|
case SetTypeZKTeco430:
|
||||||
|
gen_info = (GenInfo){
|
||||||
|
.type = GenData,
|
||||||
|
.mod = "AM650",
|
||||||
|
.freq = 430500000,
|
||||||
|
.data.name = SUBGHZ_PROTOCOL_PRINCETON_NAME,
|
||||||
|
.data.key = (key & 0x00FFFF00) | 0x30, // btn 0x30(UP), 0x03(STOP), 0x0C(DOWN)
|
||||||
|
.data.bits = 24,
|
||||||
|
.data.te = 357};
|
||||||
|
break;
|
||||||
case SetTypeNiceFlo12bit:
|
case SetTypeNiceFlo12bit:
|
||||||
gen_info = (GenInfo){
|
gen_info = (GenInfo){
|
||||||
.type = GenData,
|
.type = GenData,
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ static const char* submenu_names[SetTypeMAX] = {
|
|||||||
[SetTypeCAMESpace] = "KL: CAME Space 433MHz",
|
[SetTypeCAMESpace] = "KL: CAME Space 433MHz",
|
||||||
[SetTypePricenton315] = "Princeton 315MHz",
|
[SetTypePricenton315] = "Princeton 315MHz",
|
||||||
[SetTypePricenton433] = "Princeton 433MHz",
|
[SetTypePricenton433] = "Princeton 433MHz",
|
||||||
|
[SetTypeZKTeco430] = "ZKTeco 430MHz",
|
||||||
[SetTypeGangQi_433] = "GangQi 433MHz",
|
[SetTypeGangQi_433] = "GangQi 433MHz",
|
||||||
[SetTypeHollarm_433] = "Hollarm 433MHz",
|
[SetTypeHollarm_433] = "Hollarm 433MHz",
|
||||||
[SetTypeReversRB2_433] = "Revers RB2 433MHz",
|
[SetTypeReversRB2_433] = "Revers RB2 433MHz",
|
||||||
|
|||||||
@@ -290,8 +290,9 @@ void subghz_protocol_decoder_dickert_mahs_feed(void* context, bool level, uint32
|
|||||||
instance->decoder.decode_count_bit = 0;
|
instance->decoder.decode_count_bit = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!level) && (duration > 10 * subghz_protocol_dickert_mahs_const.te_short)) {
|
if((!level) && (DURATION_DIFF(duration, subghz_protocol_dickert_mahs_const.te_long * 50) <
|
||||||
//Found header DICKERT_MAHS
|
subghz_protocol_dickert_mahs_const.te_delta * 70)) {
|
||||||
|
//Found header DICKERT_MAHS 44k us
|
||||||
instance->decoder.parser_step = DickertMAHSDecoderStepInitial;
|
instance->decoder.parser_step = DickertMAHSDecoderStepInitial;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
static const SubGhzBlockConst subghz_protocol_linear_const = {
|
static const SubGhzBlockConst subghz_protocol_linear_const = {
|
||||||
.te_short = 500,
|
.te_short = 500,
|
||||||
.te_long = 1500,
|
.te_long = 1500,
|
||||||
.te_delta = 150,
|
.te_delta = 350,
|
||||||
.min_count_bit_for_found = 10,
|
.min_count_bit_for_found = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -118,32 +118,32 @@ static bool subghz_protocol_encoder_linear_get_upload(SubGhzProtocolEncoderLinea
|
|||||||
if(bit_read(instance->generic.data, i - 1)) {
|
if(bit_read(instance->generic.data, i - 1)) {
|
||||||
//send bit 1
|
//send bit 1
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_short * 3);
|
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_short);
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short);
|
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_long);
|
||||||
} else {
|
} else {
|
||||||
//send bit 0
|
//send bit 0
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_short);
|
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_long);
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short * 3);
|
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Send end bit
|
//Send end bit
|
||||||
if(bit_read(instance->generic.data, 0)) {
|
if(bit_read(instance->generic.data, 0)) {
|
||||||
//send bit 1
|
//send bit 1
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_short * 3);
|
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_short);
|
||||||
//Send PT_GUARD
|
//Send gap
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short * 42);
|
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short * 44);
|
||||||
} else {
|
} else {
|
||||||
//send bit 0
|
//send bit 0
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_short);
|
level_duration_make(true, (uint32_t)subghz_protocol_linear_const.te_long);
|
||||||
//Send PT_GUARD
|
//Send gap
|
||||||
instance->encoder.upload[index++] =
|
instance->encoder.upload[index++] =
|
||||||
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short * 44);
|
level_duration_make(false, (uint32_t)subghz_protocol_linear_const.te_short * 42);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -225,7 +225,7 @@ void subghz_protocol_decoder_linear_feed(void* context, bool level, uint32_t dur
|
|||||||
switch(instance->decoder.parser_step) {
|
switch(instance->decoder.parser_step) {
|
||||||
case LinearDecoderStepReset:
|
case LinearDecoderStepReset:
|
||||||
if((!level) && (DURATION_DIFF(duration, subghz_protocol_linear_const.te_short * 42) <
|
if((!level) && (DURATION_DIFF(duration, subghz_protocol_linear_const.te_short * 42) <
|
||||||
subghz_protocol_linear_const.te_delta * 20)) {
|
subghz_protocol_linear_const.te_delta * 15)) {
|
||||||
//Found header Linear
|
//Found header Linear
|
||||||
instance->decoder.decode_data = 0;
|
instance->decoder.decode_data = 0;
|
||||||
instance->decoder.decode_count_bit = 0;
|
instance->decoder.decode_count_bit = 0;
|
||||||
@@ -246,16 +246,16 @@ void subghz_protocol_decoder_linear_feed(void* context, bool level, uint32_t dur
|
|||||||
instance->decoder.parser_step = LinearDecoderStepReset;
|
instance->decoder.parser_step = LinearDecoderStepReset;
|
||||||
//checking that the duration matches the guardtime
|
//checking that the duration matches the guardtime
|
||||||
if(DURATION_DIFF(duration, subghz_protocol_linear_const.te_short * 42) >
|
if(DURATION_DIFF(duration, subghz_protocol_linear_const.te_short * 42) >
|
||||||
subghz_protocol_linear_const.te_delta * 20) {
|
subghz_protocol_linear_const.te_delta * 15) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(DURATION_DIFF(instance->decoder.te_last, subghz_protocol_linear_const.te_short) <
|
if(DURATION_DIFF(instance->decoder.te_last, subghz_protocol_linear_const.te_short) <
|
||||||
subghz_protocol_linear_const.te_delta) {
|
subghz_protocol_linear_const.te_delta) {
|
||||||
subghz_protocol_blocks_add_bit(&instance->decoder, 0);
|
subghz_protocol_blocks_add_bit(&instance->decoder, 1);
|
||||||
} else if(
|
} else if(
|
||||||
DURATION_DIFF(instance->decoder.te_last, subghz_protocol_linear_const.te_long) <
|
DURATION_DIFF(instance->decoder.te_last, subghz_protocol_linear_const.te_long) <
|
||||||
subghz_protocol_linear_const.te_delta) {
|
subghz_protocol_linear_const.te_delta) {
|
||||||
subghz_protocol_blocks_add_bit(&instance->decoder, 1);
|
subghz_protocol_blocks_add_bit(&instance->decoder, 0);
|
||||||
}
|
}
|
||||||
if(instance->decoder.decode_count_bit ==
|
if(instance->decoder.decode_count_bit ==
|
||||||
subghz_protocol_linear_const.min_count_bit_for_found) {
|
subghz_protocol_linear_const.min_count_bit_for_found) {
|
||||||
@@ -275,14 +275,14 @@ void subghz_protocol_decoder_linear_feed(void* context, bool level, uint32_t dur
|
|||||||
subghz_protocol_linear_const.te_delta) &&
|
subghz_protocol_linear_const.te_delta) &&
|
||||||
(DURATION_DIFF(duration, subghz_protocol_linear_const.te_long) <
|
(DURATION_DIFF(duration, subghz_protocol_linear_const.te_long) <
|
||||||
subghz_protocol_linear_const.te_delta)) {
|
subghz_protocol_linear_const.te_delta)) {
|
||||||
subghz_protocol_blocks_add_bit(&instance->decoder, 0);
|
subghz_protocol_blocks_add_bit(&instance->decoder, 1);
|
||||||
instance->decoder.parser_step = LinearDecoderStepSaveDuration;
|
instance->decoder.parser_step = LinearDecoderStepSaveDuration;
|
||||||
} else if(
|
} else if(
|
||||||
(DURATION_DIFF(instance->decoder.te_last, subghz_protocol_linear_const.te_long) <
|
(DURATION_DIFF(instance->decoder.te_last, subghz_protocol_linear_const.te_long) <
|
||||||
subghz_protocol_linear_const.te_delta) &&
|
subghz_protocol_linear_const.te_delta) &&
|
||||||
(DURATION_DIFF(duration, subghz_protocol_linear_const.te_short) <
|
(DURATION_DIFF(duration, subghz_protocol_linear_const.te_short) <
|
||||||
subghz_protocol_linear_const.te_delta)) {
|
subghz_protocol_linear_const.te_delta)) {
|
||||||
subghz_protocol_blocks_add_bit(&instance->decoder, 1);
|
subghz_protocol_blocks_add_bit(&instance->decoder, 0);
|
||||||
instance->decoder.parser_step = LinearDecoderStepSaveDuration;
|
instance->decoder.parser_step = LinearDecoderStepSaveDuration;
|
||||||
} else {
|
} else {
|
||||||
instance->decoder.parser_step = LinearDecoderStepReset;
|
instance->decoder.parser_step = LinearDecoderStepReset;
|
||||||
@@ -333,8 +333,8 @@ void subghz_protocol_decoder_linear_get_string(void* context, FuriString* output
|
|||||||
furi_string_cat_printf(
|
furi_string_cat_printf(
|
||||||
output,
|
output,
|
||||||
"%s %dbit\r\n"
|
"%s %dbit\r\n"
|
||||||
"Key:0x%08lX\r\n"
|
"Key:0x%03lX\r\n"
|
||||||
"Yek:0x%08lX\r\n"
|
"Yek:0x%03lX\r\n"
|
||||||
"DIP:" DIP_PATTERN "\r\n",
|
"DIP:" DIP_PATTERN "\r\n",
|
||||||
instance->generic.protocol_name,
|
instance->generic.protocol_name,
|
||||||
instance->generic.data_count_bit,
|
instance->generic.data_count_bit,
|
||||||
|
|||||||
Reference in New Issue
Block a user