From 34448a87ad6ba3b755a1de9e975b96fc021eee3a Mon Sep 17 00:00:00 2001 From: cepetr Date: Fri, 7 Feb 2025 15:43:29 +0100 Subject: [PATCH] fix(prodtest): fix haptic test [no changelog] --- core/embed/projects/prodtest/cmd/prodtest_haptic.c | 7 +++---- core/embed/projects/prodtest/cmd/prodtest_touch.c | 9 --------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/core/embed/projects/prodtest/cmd/prodtest_haptic.c b/core/embed/projects/prodtest/cmd/prodtest_haptic.c index f81e5a57dbb..c85a6214d54 100644 --- a/core/embed/projects/prodtest/cmd/prodtest_haptic.c +++ b/core/embed/projects/prodtest/cmd/prodtest_haptic.c @@ -42,16 +42,15 @@ static void prodtest_haptic_test(cli_t* cli) { return; } + haptic_play(HAPTIC_BUTTON_PRESS); + cli_trace(cli, "Running haptic feedback test for %d ms...", duration); if (!haptic_test(duration)) { cli_error(cli, CLI_ERROR, "Haptic feedback test failed."); - goto cleanup; + return; } cli_ok(cli, ""); - -cleanup: - haptic_deinit(); } // clang-format off diff --git a/core/embed/projects/prodtest/cmd/prodtest_touch.c b/core/embed/projects/prodtest/cmd/prodtest_touch.c index 4337ff52bc9..4842ec2ae48 100644 --- a/core/embed/projects/prodtest/cmd/prodtest_touch.c +++ b/core/embed/projects/prodtest/cmd/prodtest_touch.c @@ -57,8 +57,6 @@ static void prodtest_touch_version(cli_t* cli) { uint8_t version = touch_get_version(); cli_ok(cli, "%d", version); - - touch_deinit(); } static bool touch_click_timeout(cli_t* cli, uint32_t* event, uint32_t timeout) { @@ -142,8 +140,6 @@ static void prodtest_touch_test(cli_t* cli) { } } - touch_deinit(); - gfx_clear(); display_refresh(); } @@ -230,8 +226,6 @@ static void prodtest_touch_test_custom(cli_t* cli) { } } - touch_deinit(); - gfx_clear(); display_refresh(); } @@ -279,7 +273,6 @@ static void prodtest_touch_test_idle(cli_t* cli) { cli_ok(cli, ""); cleanup: - touch_deinit(); gfx_clear(); display_refresh(); } @@ -365,8 +358,6 @@ static void prodtest_touch_test_sensitivity(cli_t* cli) { } } - touch_deinit(); - gfx_clear(); display_refresh(); }