mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
subghz raw protocol fixes
by WillyJL
This commit is contained in:
@@ -291,9 +291,11 @@ void subghz_protocol_encoder_raw_stop(void* context) {
|
|||||||
furi_check(context);
|
furi_check(context);
|
||||||
SubGhzProtocolEncoderRAW* instance = context;
|
SubGhzProtocolEncoderRAW* instance = context;
|
||||||
instance->is_running = false;
|
instance->is_running = false;
|
||||||
if(subghz_file_encoder_worker_is_running(instance->file_worker_encoder)) {
|
if(instance->file_worker_encoder &&
|
||||||
|
subghz_file_encoder_worker_is_running(instance->file_worker_encoder)) {
|
||||||
subghz_file_encoder_worker_stop(instance->file_worker_encoder);
|
subghz_file_encoder_worker_stop(instance->file_worker_encoder);
|
||||||
subghz_file_encoder_worker_free(instance->file_worker_encoder);
|
subghz_file_encoder_worker_free(instance->file_worker_encoder);
|
||||||
|
instance->file_worker_encoder = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,6 +320,7 @@ void subghz_protocol_raw_file_encoder_worker_set_callback_end(
|
|||||||
|
|
||||||
static bool subghz_protocol_encoder_raw_worker_init(SubGhzProtocolEncoderRAW* instance) {
|
static bool subghz_protocol_encoder_raw_worker_init(SubGhzProtocolEncoderRAW* instance) {
|
||||||
furi_assert(instance);
|
furi_assert(instance);
|
||||||
|
furi_check(!instance->file_worker_encoder);
|
||||||
|
|
||||||
instance->file_worker_encoder = subghz_file_encoder_worker_alloc();
|
instance->file_worker_encoder = subghz_file_encoder_worker_alloc();
|
||||||
if(subghz_file_encoder_worker_start(
|
if(subghz_file_encoder_worker_start(
|
||||||
|
|||||||
Reference in New Issue
Block a user