From 2143e7a3290bf814f59d4443bf6e20a34e2fea5b Mon Sep 17 00:00:00 2001 From: Mathias Malmqvist Date: Wed, 29 Oct 2025 18:45:10 +0100 Subject: [PATCH] Add Repeat-button to the Haptic test --- js/modals/quick-test-modal.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/modals/quick-test-modal.js b/js/modals/quick-test-modal.js index a11a630..e2486de 100644 --- a/js/modals/quick-test-modal.js +++ b/js/modals/quick-test-modal.js @@ -264,6 +264,7 @@ export class QuickTestModal { case 'haptic': const hapticTestDesc = l('This test will activate the controller\'s vibration motors, first the heavy one, and then the light one.'); const hapticInstructions = l('Feel for vibration in the controller.'); + const hapticRepeat = l('Repeat'); return `

${hapticTestDesc}

${instructions}: ${hapticInstructions}

@@ -274,6 +275,9 @@ export class QuickTestModal { + `; case 'adaptive': @@ -1645,6 +1649,12 @@ function replaySpeakerTest() { } } +function replayHapticTest() { + if (currentQuickTestInstance) { + currentQuickTestInstance._startHapticTest(); + } +} + // Legacy compatibility - expose functions to window for HTML onclick handlers window.markTestResult = markTestResult; window.resetAllTests = resetAllTests; @@ -1653,3 +1663,4 @@ window.skipTest = skipTest; window.addTestBack = addTestBack; window.testHeadphoneAudio = testHeadphoneAudio; window.replaySpeakerTest = replaySpeakerTest; +window.replayHapticTest = replayHapticTest;