Fix steppers connection. #13

This commit is contained in:
osiu97
2026-07-10 18:40:42 +02:00
parent dd8f6b2277
commit a1d93c747b
9 changed files with 61 additions and 58 deletions
+7 -7
View File
@@ -56,9 +56,9 @@ function syncStateFromStorage() {
steps2 = isHomed ? parseInt(localStorage.getItem('wiji_steps2') || IK.ARM.HOME_STEPS.m2) : IK.ARM.HOME_STEPS.m2;
// Auto-migrate the old buggy negative home position to the new positive one
if (steps1 === -1024) {
steps1 = 1024;
localStorage.setItem('wiji_steps1', 1024);
if (steps1 === -2048 || steps1 === -1024 || steps1 === 1024) {
steps1 = 2048;
localStorage.setItem('wiji_steps1', 2048);
}
Motion.setSteps(steps1, steps2);
}
@@ -570,16 +570,16 @@ function buildHTML() {
<label class="form-label">Speed (steps/s)</label>
<div class="range-row">
<input class="form-range" type="range" id="speed-slider"
min="100" max="2000" step="50" value="600"/>
<span class="range-value" id="speed-val">600</span>
min="100" max="1200" step="50" value="800"/>
<span class="range-value" id="speed-val">800</span>
</div>
</div>
<div class="form-group">
<label class="form-label">Accel (steps/s²)</label>
<div class="range-row">
<input class="form-range" type="range" id="accel-slider"
min="50" max="2000" step="25" value="100"/>
<span class="range-value" id="accel-val">100</span>
min="50" max="500" step="25" value="400"/>
<span class="range-value" id="accel-val">400</span>
</div>
</div>
</div>