Add hand-raised patrol routes with greeting stops and round counts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -229,6 +229,8 @@ input[type=color]{width:30px;height:28px;border:1px solid var(--line);border-rad
|
||||
<div class="card box">
|
||||
<h3>Go to</h3>
|
||||
<div class="row"><div class="dd" id="destDD"></div><button class="btn primary" id="goBtn">Go ➜</button></div>
|
||||
<div class="opts"><label class="toggle"><input type="checkbox" id="loop"> Loop</label>
|
||||
<label class="toggle"><input type="number" id="rounds" value="0" min="0" max="99" style="width:56px"> times (0 = ∞)</label></div>
|
||||
<div class="row"><button class="btn grow" id="dockBtn">⌂ Dock</button><button class="btn danger grow" id="cancelBtn">Cancel drive</button></div>
|
||||
</div>
|
||||
|
||||
@@ -726,7 +728,7 @@ $("goBtn").onclick = e => {
|
||||
const stops = destDD.values, name = n => n === "home" ? "the dock" : n;
|
||||
if (!stops.length) return note("Choose a place first");
|
||||
if (stops.length === 1) return act(e.target, () => api("/agv/go", {marker: stops[0]}));
|
||||
act(e.target, () => api("/agv/route", {markers: stops, pause: +$("pause").value || 0}));
|
||||
act(e.target, () => api("/agv/route", {markers: stops, pause: +$("pause").value || 0, loop: $("loop").checked, rounds: +$("rounds").value || 0}));
|
||||
};
|
||||
$("dockBtn").onclick = e => act(e.target, () => api("/agv/go", {marker: "home"}));
|
||||
$("cancelBtn").onclick = e => act(e.target, () => api("/agv/cancel", {}));
|
||||
|
||||
Reference in New Issue
Block a user