mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +00:00
Fix
This commit is contained in:
parent
c2545a2f7b
commit
f86582b99e
1 changed files with 13 additions and 1 deletions
|
@ -188,7 +188,7 @@ static void subghz_protocol_encoder_nice_flor_s_get_upload(
|
||||||
add_data[9] = 0;
|
add_data[9] = 0;
|
||||||
subghz_protocol_nice_one_get_data(add_data, i, 0);
|
subghz_protocol_nice_one_get_data(add_data, i, 0);
|
||||||
for(size_t j = 6; j < 9; j++) {
|
for(size_t j = 6; j < 9; j++) {
|
||||||
instance->generic.data_2 = instance->generic.data_2 << 8 | add_data[i];
|
instance->generic.data_2 = instance->generic.data_2 << 8 | add_data[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Send key data
|
//Send key data
|
||||||
|
@ -249,6 +249,18 @@ bool subghz_protocol_encoder_nice_flor_s_deserialize(void* context, FlipperForma
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(instance->generic.data_count_bit == NICE_ONE_COUNT_BIT) {
|
||||||
|
if(!flipper_format_rewind(flipper_format)) {
|
||||||
|
FURI_LOG_E(TAG, "Rewind error");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
uint32_t data = instance->generic.data_2 & 0xffffff;
|
||||||
|
if(res && !flipper_format_write_uint32(flipper_format, "Data", &data, 1)) {
|
||||||
|
FURI_LOG_E(TAG, "Unable to add Data");
|
||||||
|
res = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
instance->encoder.is_running = true;
|
instance->encoder.is_running = true;
|
||||||
|
|
||||||
res = true;
|
res = true;
|
||||||
|
|
Loading…
Reference in a new issue