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
+2 -2
View File
@@ -140,13 +140,13 @@ function buildHTML() {
<label class="form-label" style="margin:0;">Speed</label>
<span id="speed-val" style="font-size: 0.8rem; color: var(--text-muted);">${Settings.speed}</span>
</div>
<input type="range" id="bc-slider-speed" min="100" max="2000" step="100" value="${Settings.speed}" style="width:100%; margin-bottom: 8px;">
<input type="range" id="bc-slider-speed" min="100" max="1200" step="100" value="${Settings.speed}" style="width:100%; margin-bottom: 8px;">
<div style="display: flex; justify-content: space-between; margin-bottom: 4px;">
<label class="form-label" style="margin:0;">Accel</label>
<span id="accel-val" style="font-size: 0.8rem; color: var(--text-muted);">${Settings.accel}</span>
</div>
<input type="range" id="bc-slider-accel" min="50" max="2000" step="50" value="${Settings.accel}" style="width:100%;">
<input type="range" id="bc-slider-accel" min="50" max="500" step="50" value="${Settings.accel}" style="width:100%;">
</div>
<div class="form-group" style="margin-bottom: 12px;">
+7 -6
View File
@@ -166,13 +166,14 @@ function buildHTML() {
<label class="form-label" style="margin:0;">Speed</label>
<span id="speed-val" style="font-size: 0.8rem; color: var(--text-muted);">${Settings.speed}</span>
</div>
<input type="range" id="slider-speed" min="100" max="2000" step="100" value="${Settings.speed}" style="width:100%; margin-bottom: 8px;">
<div class="setting-row">
<label class="form-label" style="margin:0;">Accel</label>
<span id="accel-val" style="font-size: 0.8rem; color: var(--text-muted);">${Settings.accel}</span>
<input type="range" id="slider-speed" min="100" max="1200" step="100" value="${Settings.speed}" style="width:100%; margin-bottom: 8px;">
</div>
<div class="form-group" style="margin-bottom:0;">
<div style="display:flex; justify-content:space-between; margin-bottom:4px;">
<label class="form-label" style="margin:0;">Acceleration</label>
<span id="val-accel" style="font-size:0.8rem; color:var(--accent-blue);">${Settings.accel}</span>
</div>
<input type="range" id="slider-accel" min="50" max="2000" step="50" value="${Settings.accel}" style="width:100%; margin-bottom: 8px;">
<input type="range" id="slider-accel" min="50" max="500" step="50" value="${Settings.accel}" style="width:100%; margin-bottom: 8px;">
<div class="setting-row">
<label class="form-label" style="margin:0;">Global Delay (ms)</label>
+2 -2
View File
@@ -298,13 +298,13 @@ function buildHTML() {
<label class="form-label" style="margin:0;">Speed</label>
<span id="speed-val" style="font-size: 0.8rem; color: var(--text-muted);">${Settings.speed}</span>
</div>
<input type="range" id="slider-speed" min="100" max="2000" step="100" value="${Settings.speed}" style="width:100%; margin-bottom: 8px;">
<input type="range" id="slider-speed" min="100" max="1200" step="100" value="${Settings.speed}" style="width:100%; margin-bottom: 8px;">
<div class="setting-row">
<label class="form-label" style="margin:0;">Accel</label>
<span id="accel-val" style="font-size: 0.8rem; color: var(--text-muted);">${Settings.accel}</span>
</div>
<input type="range" id="slider-accel" min="50" max="2000" step="50" value="${Settings.accel}" style="width:100%; margin-bottom: 8px;">
<input type="range" id="slider-accel" min="50" max="500" step="50" value="${Settings.accel}" style="width:100%; margin-bottom: 8px;">
<div class="setting-row">
<label class="form-label" style="margin:0;">Global Delay (ms)</label>
+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>