mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 22:40:25 +00:00
fix anomaly
This commit is contained in:
parent
32fb94f5db
commit
ce1336c0ed
1 changed files with 14 additions and 14 deletions
|
@ -111,16 +111,16 @@ void subghz_protocol_encoder_faac_slh_free(void* context) {
|
|||
free(instance);
|
||||
}
|
||||
|
||||
static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* instance, FlipperFormat* flipper_format) {
|
||||
FuriString* valid = furi_string_alloc();
|
||||
if(flipper_format_read_string(flipper_format, "Valid", valid)) {
|
||||
bvalid = true;
|
||||
FURI_LOG_I(TAG, "[gen_data] is valid ? : %i", bvalid);
|
||||
} else {
|
||||
bvalid = false;
|
||||
FURI_LOG_I(TAG, "[gen_data] is valid ? : %i", bvalid);
|
||||
}
|
||||
furi_string_free(valid);
|
||||
static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* instance) {
|
||||
//FuriString* valid = furi_string_alloc();
|
||||
//if(flipper_format_read_string(flipper_format, "Valid", valid)) {
|
||||
//bvalid = true;
|
||||
//FURI_LOG_I(TAG, "[gen_data] is valid ? : %i", bvalid);
|
||||
//} else {
|
||||
//bvalid = false;
|
||||
//FURI_LOG_I(TAG, "[gen_data] is valid ? : %i", bvalid);
|
||||
//}
|
||||
//furi_string_free(valid);
|
||||
if(bvalid) {
|
||||
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
|
||||
FURI_LOG_I(TAG, "[gen_data] TRUE : %i", bvalid);
|
||||
|
@ -185,7 +185,7 @@ bool subghz_protocol_faac_slh_create_data(
|
|||
instance->generic.seed = seed;
|
||||
instance->manufacture_name = manufacture_name;
|
||||
instance->generic.data_count_bit = 64;
|
||||
bool res = subghz_protocol_faac_slh_gen_data(instance, flipper_format);
|
||||
bool res = subghz_protocol_faac_slh_gen_data(instance);
|
||||
if(res) {
|
||||
return SubGhzProtocolStatusOk ==
|
||||
subghz_block_generic_serialize(&instance->generic, flipper_format, preset);
|
||||
|
@ -198,10 +198,10 @@ bool subghz_protocol_faac_slh_create_data(
|
|||
* @param instance Pointer to a SubGhzProtocolEncoderFaacSLH instance
|
||||
* @return true On success
|
||||
*/
|
||||
static bool subghz_protocol_encoder_faac_slh_get_upload(SubGhzProtocolEncoderFaacSLH* instance, FlipperFormat* flipper_format) {
|
||||
static bool subghz_protocol_encoder_faac_slh_get_upload(SubGhzProtocolEncoderFaacSLH* instance) {
|
||||
furi_assert(instance);
|
||||
|
||||
subghz_protocol_faac_slh_gen_data(instance, flipper_format);
|
||||
subghz_protocol_faac_slh_gen_data(instance);
|
||||
size_t index = 0;
|
||||
size_t size_upload = 2 + (instance->generic.data_count_bit * 2);
|
||||
if(size_upload > instance->encoder.size_upload) {
|
||||
|
@ -274,7 +274,7 @@ SubGhzProtocolStatus
|
|||
flipper_format_read_uint32(
|
||||
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
|
||||
|
||||
subghz_protocol_encoder_faac_slh_get_upload(instance, flipper_format);
|
||||
subghz_protocol_encoder_faac_slh_get_upload(instance);
|
||||
|
||||
if(!flipper_format_rewind(flipper_format)) {
|
||||
FURI_LOG_E(TAG, "Rewind error");
|
||||
|
|
Loading…
Reference in a new issue