Be smarter when resetting circularity data in finetune modal

This commit is contained in:
Mathias Malmqvist
2025-10-28 01:53:00 +01:00
committed by dualshock-tools
parent bc7a8942b0
commit 3ab97fb10f
2 changed files with 5 additions and 13 deletions

View File

@@ -487,9 +487,9 @@ function collectCircularityData(stickStates, leftData, rightData) {
}
}
function clear_circularity() {
ll_data.fill(0);
rr_data.fill(0);
function clear_circularity(leftOrRight = 'both') {
if(['left', 'both'].includes(leftOrRight)) ll_data.fill(0);
if(['right', 'both'].includes(leftOrRight)) rr_data.fill(0);
}
function reset_circularity_mode() {

View File

@@ -996,14 +996,6 @@ export class Finetune {
this._updateStepSizeUI();
}
/**
* Reset circularity sliders to zero position
*/
_resetCircularitySliders() {
$(`#leftCircularitySlider`).val(0);
$(`#rightCircularitySlider`).val(0);
}
/**
* Handle the start of circularity slider adjustment
* Store base values and reset previous slider value
@@ -1112,7 +1104,7 @@ export class Finetune {
circData.fill(0);
// Call the clearCircularity function to update the display
this.clearCircularity();
this.clearCircularity(lOrR);
// Trigger the change event to update the finetune data once when slider is released
this._onFinetuneChange();
@@ -1170,7 +1162,7 @@ export class Finetune {
this._showErrorSlackButton(lOrR);
// Clear the circularity data display
this.clearCircularity();
this.clearCircularity(lOrR);
// Trigger the change event to update the finetune data
this._onFinetuneChange();