Add Repeat button to the Speaker test

This commit is contained in:
Mathias Malmqvist
2025-10-12 01:09:37 +02:00
committed by dualshock-tools
parent 5efa1b5be4
commit 889ecf6b29
23 changed files with 34 additions and 1 deletions

View File

@@ -307,6 +307,7 @@ export class QuickTestModal {
case 'speaker': case 'speaker':
const speakerTestDesc = l('This test will play a tone through the controller\'s built-in speaker.'); const speakerTestDesc = l('This test will play a tone through the controller\'s built-in speaker.');
const speakerInstructions = l('Listen for a tone from the controller speaker.'); const speakerInstructions = l('Listen for a tone from the controller speaker.');
const repeat = l('Repeat');
return ` return `
<p>${speakerTestDesc}</p> <p>${speakerTestDesc}</p>
<p><strong>${instructions}:</strong> ${speakerInstructions}</p> <p><strong>${instructions}:</strong> ${speakerInstructions}</p>
@@ -317,6 +318,9 @@ export class QuickTestModal {
<button type="button" class="btn btn-danger" id="speaker-fail-btn" onclick="markTestResult('speaker', false)"> <button type="button" class="btn btn-danger" id="speaker-fail-btn" onclick="markTestResult('speaker', false)">
<i class="fas fa-times me-1"></i><span>${fail}</span> <i class="fas fa-times me-1"></i><span>${fail}</span>
</button> </button>
<button type="button" class="btn btn-outline-primary" id="speaker-replay-btn" onclick="replaySpeakerTest()">
<i class="fas fa-redo me-1"></i><span>${repeat}</span>
</button>
</div> </div>
`; `;
case 'microphone': case 'microphone':
@@ -1614,10 +1618,17 @@ function testHeadphoneAudio() {
} }
} }
function replaySpeakerTest() {
if (currentQuickTestInstance) {
currentQuickTestInstance._startSpeakerTest();
}
}
// Legacy compatibility - expose functions to window for HTML onclick handlers // Legacy compatibility - expose functions to window for HTML onclick handlers
window.markTestResult = markTestResult; window.markTestResult = markTestResult;
window.resetAllTests = resetAllTests; window.resetAllTests = resetAllTests;
window.resetButtonsTest = resetButtonsTest; window.resetButtonsTest = resetButtonsTest;
window.skipTest = skipTest; window.skipTest = skipTest;
window.addTestBack = addTestBack; window.addTestBack = addTestBack;
window.testHeadphoneAudio = testHeadphoneAudio; window.testHeadphoneAudio = testHeadphoneAudio;
window.replaySpeakerTest = replaySpeakerTest;

View File

@@ -263,6 +263,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -253,6 +253,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -247,6 +247,7 @@
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Reboot controller": "", "Reboot controller": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -283,6 +283,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -259,6 +259,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",

View File

@@ -247,6 +247,7 @@
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Reboot controller": "", "Reboot controller": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -132,6 +132,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -247,6 +247,7 @@
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Reboot controller": "", "Reboot controller": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -278,6 +278,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -281,6 +281,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -248,6 +248,7 @@
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Reboot controller": "", "Reboot controller": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",

View File

@@ -280,6 +280,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -247,6 +247,7 @@
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Reboot controller": "", "Reboot controller": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -281,6 +281,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -253,6 +253,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Right stick": "", "Right stick": "",

View File

@@ -274,6 +274,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -264,6 +264,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Right Module Barcode": "", "Right Module Barcode": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",

View File

@@ -274,6 +274,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -283,6 +283,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -283,6 +283,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -280,6 +280,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",

View File

@@ -280,6 +280,7 @@
"Quick Test": "", "Quick Test": "",
"Quick calibrate": "", "Quick calibrate": "",
"Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "", "Range calibration appears to have failed. Please try again and make sure you rotate the sticks.": "",
"Repeat": "",
"Restart": "", "Restart": "",
"Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "", "Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.": "",
"Run through these tests to verify your controller's functionality.": "", "Run through these tests to verify your controller's functionality.": "",