feat(pose_3d): bottone Sblocca braccia
This commit is contained in:
1 parent
bb6796bfe3
commit
71baf829e6
1 file changed
+16
@@ -574,6 +574,21 @@ function bindPoseButtons() {
|
|||||||
$('p3PoseDelBtn').addEventListener('click', onDeletePose);
|
$('p3PoseDelBtn').addEventListener('click', onDeletePose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function onUnlock() {
|
||||||
|
clearError();
|
||||||
|
try {
|
||||||
|
await jsonFetch('/api/pose_3d/unlock', { method: 'POST' });
|
||||||
|
$('p3Status').textContent = '✓ Braccia sbloccate';
|
||||||
|
$('p3Status').className = 'p3-status ok';
|
||||||
|
} catch (e) {
|
||||||
|
showError(`Unlock fallito: ${e.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function bindUnlockButton() {
|
||||||
|
$('p3UnlockBtn').addEventListener('click', onUnlock);
|
||||||
|
}
|
||||||
|
|
||||||
// ----- init triggered on first activation -----
|
// ----- init triggered on first activation -----
|
||||||
let inited = false;
|
let inited = false;
|
||||||
function ensureInit() {
|
function ensureInit() {
|
||||||
@@ -590,6 +605,7 @@ function ensureInit() {
|
|||||||
bindPreciseControl();
|
bindPreciseControl();
|
||||||
bindJogAutoApply();
|
bindJogAutoApply();
|
||||||
bindPoseButtons();
|
bindPoseButtons();
|
||||||
|
bindUnlockButton();
|
||||||
pollState();
|
pollState();
|
||||||
pollTimer = setInterval(pollState, POLL_MS);
|
pollTimer = setInterval(pollState, POLL_MS);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user