mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
SubGHz: Fix starline encoder
o_O
This commit is contained in:
@@ -59,7 +59,7 @@ Also check changelog in releases for latest updates!
|
|||||||
- FAAC SLH (Spa) [External seed calculation required (For info contact me in Discord: Nano#8998)]
|
- FAAC SLH (Spa) [External seed calculation required (For info contact me in Discord: Nano#8998)]
|
||||||
- BFT Mitto [External seed calculation required (For info contact me in Discord: Nano#8998)]
|
- BFT Mitto [External seed calculation required (For info contact me in Discord: Nano#8998)]
|
||||||
- Security+ v1 & v2
|
- Security+ v1 & v2
|
||||||
- Star Line (saving only)
|
- Star Line
|
||||||
|
|
||||||
## Support us so we can buy equipment and develop new features
|
## Support us so we can buy equipment and develop new features
|
||||||
* Boosty: https://boosty.to/mmxdev
|
* Boosty: https://boosty.to/mmxdev
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const SubGhzProtocol subghz_protocol_star_line = {
|
|||||||
.name = SUBGHZ_PROTOCOL_STAR_LINE_NAME,
|
.name = SUBGHZ_PROTOCOL_STAR_LINE_NAME,
|
||||||
.type = SubGhzProtocolTypeDynamic,
|
.type = SubGhzProtocolTypeDynamic,
|
||||||
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Decodable |
|
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Decodable |
|
||||||
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save,
|
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save | SubGhzProtocolFlag_Send,
|
||||||
|
|
||||||
.decoder = &subghz_protocol_star_line_decoder,
|
.decoder = &subghz_protocol_star_line_decoder,
|
||||||
.encoder = &subghz_protocol_star_line_encoder,
|
.encoder = &subghz_protocol_star_line_encoder,
|
||||||
@@ -236,7 +236,7 @@ static bool subghz_protocol_encoder_star_line_get_upload(
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t index = 0;
|
size_t index = 0;
|
||||||
size_t size_upload = 6 * 2 + (instance->generic.data_count_bit * 2) + 4;
|
size_t size_upload = 6 * 2 + (instance->generic.data_count_bit * 2);
|
||||||
if(size_upload > instance->encoder.size_upload) {
|
if(size_upload > instance->encoder.size_upload) {
|
||||||
FURI_LOG_E(TAG, "Size upload exceeds allocated encoder buffer.");
|
FURI_LOG_E(TAG, "Size upload exceeds allocated encoder buffer.");
|
||||||
return false;
|
return false;
|
||||||
@@ -763,8 +763,7 @@ void subghz_protocol_decoder_star_line_get_string(void* context, FuriString* out
|
|||||||
"Key:%08lX%08lX\r\n"
|
"Key:%08lX%08lX\r\n"
|
||||||
"Fix:0x%08lX Cnt:%04lX\r\n"
|
"Fix:0x%08lX Cnt:%04lX\r\n"
|
||||||
"Hop:0x%08lX Btn:%02X\r\n"
|
"Hop:0x%08lX Btn:%02X\r\n"
|
||||||
"MF:%s\r\n"
|
"MF:%s\r\n",
|
||||||
"Sn:0x%07lX \r\n",
|
|
||||||
instance->generic.protocol_name,
|
instance->generic.protocol_name,
|
||||||
instance->generic.data_count_bit,
|
instance->generic.data_count_bit,
|
||||||
code_found_hi,
|
code_found_hi,
|
||||||
@@ -773,6 +772,5 @@ void subghz_protocol_decoder_star_line_get_string(void* context, FuriString* out
|
|||||||
instance->generic.cnt,
|
instance->generic.cnt,
|
||||||
code_found_reverse_lo,
|
code_found_reverse_lo,
|
||||||
instance->generic.btn,
|
instance->generic.btn,
|
||||||
instance->manufacture_name,
|
instance->manufacture_name);
|
||||||
instance->generic.serial);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user