Unblock all freqs. Allow Keeloq save&send

"custom_save_and_send" of r3df0xx contributor was moved here and updated to latest dev refactoring.
This commit is contained in:
r3df0xx
2022-03-16 17:28:09 +03:00
parent 94ba7d104c
commit a18cd53bb1
2 changed files with 11 additions and 13 deletions

View File

@@ -285,7 +285,7 @@ static const uint8_t furi_hal_subghz_preset_ook_async_patable[8] = {
0x00}; 0x00};
static const uint8_t furi_hal_subghz_preset_ook_async_patable_au[8] = { static const uint8_t furi_hal_subghz_preset_ook_async_patable_au[8] = {
0x00, 0x00,
0x37, // 12dBm 0xC0, 10dBm 0xC5, 7dBm 0xCD, 5dBm 0x86, 0dBm 0x50, -6dBm 0x37, -10dBm 0x26, -15dBm 0x1D, -20dBm 0x17, -30dBm 0x03 0xC0, // 12dBm 0xC0, 10dBm 0xC5, 7dBm 0xCD, 5dBm 0x86, 0dBm 0x50, -6dBm 0x37, -10dBm 0x26, -15dBm 0x1D, -20dBm 0x17, -30dBm 0x03
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
@@ -573,17 +573,18 @@ bool furi_hal_subghz_is_tx_allowed(uint32_t value) {
switch(furi_hal_version_get_hw_region()) { switch(furi_hal_version_get_hw_region()) {
case FuriHalVersionRegionEuRu: case FuriHalVersionRegionEuRu:
//433,05..434,79; 868,15..868,55 //433,05..434,79; 868,15..868,55
if(!(value >= 433050000 && value <= 434790000) && if(!(value >= 299999755 && value <= 348000335) &&
!(value >= 868150000 && value <= 868550000)) { !(value >= 386999938 && value <= 464000000) &&
!(value >= 778999847 && value <= 928000000)) {
} else { } else {
is_allowed = true; is_allowed = true;
} }
break; break;
case FuriHalVersionRegionUsCaAu: case FuriHalVersionRegionUsCaAu:
//304,10..321,95; 433,05..434,79; 915,00..928,00 //304,10..321,95; 433,05..434,79; 915,00..928,00
if(!(value >= 304100000 && value <= 321950000) && if(!(value >= 299999755 && value <= 348000335) &&
!(value >= 433050000 && value <= 434790000) && !(value >= 386999938 && value <= 464000000) &&
!(value >= 915000000 && value <= 928000000)) { !(value >= 778999847 && value <= 928000000)) {
} else { } else {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) { if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
if((value >= 304100000 && value <= 321950000) && if((value >= 304100000 && value <= 321950000) &&
@@ -597,8 +598,9 @@ bool furi_hal_subghz_is_tx_allowed(uint32_t value) {
break; break;
case FuriHalVersionRegionJp: case FuriHalVersionRegionJp:
//312,00..315,25; 920,50..923,50 //312,00..315,25; 920,50..923,50
if(!(value >= 312000000 && value <= 315250000) && if(!(value >= 299999755 && value <= 348000335) &&
!(value >= 920500000 && value <= 923500000)) { !(value >= 386999938 && value <= 464000000) &&
!(value >= 778999847 && value <= 928000000)) {
} else { } else {
is_allowed = true; is_allowed = true;
} }

View File

@@ -74,7 +74,7 @@ const SubGhzProtocol subghz_protocol_keeloq = {
.name = SUBGHZ_PROTOCOL_KEELOQ_NAME, .name = SUBGHZ_PROTOCOL_KEELOQ_NAME,
.type = SubGhzProtocolTypeDynamic, .type = SubGhzProtocolTypeDynamic,
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_868 | SubGhzProtocolFlag_315 | .flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_868 | SubGhzProtocolFlag_315 |
SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_Load | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save |
SubGhzProtocolFlag_Send, SubGhzProtocolFlag_Send,
.decoder = &subghz_protocol_keeloq_decoder, .decoder = &subghz_protocol_keeloq_decoder,
@@ -270,10 +270,6 @@ bool subghz_protocol_encoder_keeloq_deserialize(void* context, FlipperFormat* fl
subghz_protocol_keeloq_check_remote_controller( subghz_protocol_keeloq_check_remote_controller(
&instance->generic, instance->keystore, &instance->manufacture_name); &instance->generic, instance->keystore, &instance->manufacture_name);
if(strcmp(instance->manufacture_name, "DoorHan")) {
break;
}
//optional parameter parameter //optional parameter parameter
flipper_format_read_uint32( flipper_format_read_uint32(
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);