From 5a730e3adc4e762b06f45e9348bb4d1e28b431b3 Mon Sep 17 00:00:00 2001 From: Georgii Surkov <37121527+gsurkov@users.noreply.github.com> Date: Mon, 13 Feb 2023 14:33:15 +0300 Subject: [PATCH] [FL-3107] Fix Cyfral & Metakom emulation (#2392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix Cyfral & Metakom emulation Co-authored-by: あく --- lib/one_wire/ibutton/ibutton_worker_modes.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/one_wire/ibutton/ibutton_worker_modes.c b/lib/one_wire/ibutton/ibutton_worker_modes.c index da6b10766..4f7f0855a 100644 --- a/lib/one_wire/ibutton/ibutton_worker_modes.c +++ b/lib/one_wire/ibutton/ibutton_worker_modes.c @@ -237,10 +237,8 @@ void ibutton_worker_emulate_timer_cb(void* context) { const LevelDuration level_duration = protocol_dict_encoder_yield(worker->protocols, worker->protocol_to_encode); - const bool level = level_duration_get_level(level_duration); - - furi_hal_ibutton_emulate_set_next(level); - furi_hal_ibutton_pin_write(level); + furi_hal_ibutton_emulate_set_next(level_duration_get_duration(level_duration)); + furi_hal_ibutton_pin_write(level_duration_get_level(level_duration)); } void ibutton_worker_emulate_timer_start(iButtonWorker* worker) {