infinicode 2.8.51 → 2.8.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5448,14 +5448,16 @@ button.act:disabled{opacity:0.5;cursor:default;}
|
|
|
5448
5448
|
// LiveKit is the authoritative camera feed. The standalone OpenCV MJPEG
|
|
5449
5449
|
// server is opt-in because running it beside preview_agent would open the
|
|
5450
5450
|
// same Windows camera twice and make both feeds unreliable.
|
|
5451
|
-
function tryVisionOverlay(n){
|
|
5452
|
-
var img=$('pk-vision-img'); if(!img) return;
|
|
5453
|
-
if(String(window.localStorage.getItem('robopark.visionOverlay')||'').toLowerCase()!=='true'){
|
|
5454
|
-
visionOn=false; img.src=''; img.style.display='none'; return;
|
|
5455
|
-
}
|
|
5456
|
-
var row=schedRow(n),
|
|
5457
|
-
|
|
5458
|
-
var
|
|
5451
|
+
function tryVisionOverlay(n, force){
|
|
5452
|
+
var img=$('pk-vision-img'); if(!img) return;
|
|
5453
|
+
if(!force && String(window.localStorage.getItem('robopark.visionOverlay')||'').toLowerCase()!=='true'){
|
|
5454
|
+
visionOn=false; img.src=''; img.style.display='none'; return;
|
|
5455
|
+
}
|
|
5456
|
+
var row=schedRow(n)||{}, device=schedulerDevice(n)||{};
|
|
5457
|
+
var preferTail=/^100\./.test(location.hostname);
|
|
5458
|
+
var ip=preferTail ? (device.tailscale_ip||row.tailscale_ip||device.lan_ip||row.lan_ip) : (device.lan_ip||row.lan_ip||device.tailscale_ip||row.tailscale_ip);
|
|
5459
|
+
if(!ip){ visionOn=false; img.src=''; img.style.display='none'; return; }
|
|
5460
|
+
var port=row.vision_port||5000;
|
|
5459
5461
|
visionOn=true;
|
|
5460
5462
|
img.onerror=function(){ visionOn=false; img.style.display='none'; img.src=''; };
|
|
5461
5463
|
img.onload=function(){ img.style.display='block'; };
|
|
@@ -5485,7 +5487,8 @@ button.act:disabled{opacity:0.5;cursor:default;}
|
|
|
5485
5487
|
var device=schedulerDevice(n)||{}, inv=device.device_inventory||{};
|
|
5486
5488
|
if(hasRealInventory(inv)) deviceSelectorsReady=true;
|
|
5487
5489
|
var search=$('pk-device-search'), query=(search&&search.value||'').trim().toLowerCase();
|
|
5488
|
-
|
|
5490
|
+
// Do not invent Picamera/V4L2 choices when the robot has not reported hardware.
|
|
5491
|
+
var video=deviceList(inv,'video',['auto','none']);
|
|
5489
5492
|
var input=deviceList(inv,'audio_input',['default','none']);
|
|
5490
5493
|
var output=deviceList(inv,'audio_output',['default','none']);
|
|
5491
5494
|
function fill(id, list, selected){
|
|
@@ -5501,7 +5504,11 @@ button.act:disabled{opacity:0.5;cursor:default;}
|
|
|
5501
5504
|
fill('pk-audio-output', output, device.audio_output_device||'default');
|
|
5502
5505
|
var greetings=$('pk-greeting-phrases');
|
|
5503
5506
|
if(greetings && document.activeElement!==greetings) greetings.value=(device.greeting_phrases||[]).join(String.fromCharCode(10));
|
|
5504
|
-
var note=$('pk-device-note');
|
|
5507
|
+
var note=$('pk-device-note');
|
|
5508
|
+
if(note){
|
|
5509
|
+
var source=inv.source||'robot heartbeat', counts=(inv.video||[]).length+'/'+(inv.audio_input||[]).length+'/'+(inv.audio_output||[]).length;
|
|
5510
|
+
note.textContent=hasRealInventory(inv) ? ('inventory from '+source+' · camera/mic/speaker '+counts) : (device.id ? 'no real hardware inventory reported yet · restart vision-agent + preview-agent on this robot' : 'waiting for robot heartbeat inventory');
|
|
5511
|
+
}
|
|
5505
5512
|
}
|
|
5506
5513
|
function saveDeviceSelectors(n){
|
|
5507
5514
|
var device=schedulerDevice(n), id=device&&device.id; if(!id){ showOut('device inventory is not available yet'); return; }
|
|
@@ -5908,7 +5915,13 @@ button.act:disabled{opacity:0.5;cursor:default;}
|
|
|
5908
5915
|
_bindShellSection(n);
|
|
5909
5916
|
_spkTestRenderHistory(schedId(n));
|
|
5910
5917
|
var runSpkTest = $('pk-spk-runtest'); if(runSpkTest) runSpkTest.addEventListener('click', function(){ if(rpReadOnly){ showOut('read-only node'); return; } runSpeakerTest(n); });
|
|
5911
|
-
var gl=$('pk-golive');
|
|
5918
|
+
var gl=$('pk-golive');
|
|
5919
|
+
if(gl){
|
|
5920
|
+
gl.addEventListener('click', function(){ if(rpReadOnly){ showOut('read-only node'); return; } goLive(n); });
|
|
5921
|
+
var vl=document.createElement('button'); vl.className='rp-btn'; vl.id='pk-vision-live'; vl.textContent='Open RoboVision feed';
|
|
5922
|
+
vl.addEventListener('click', function(){ tryVisionOverlay(n, true); if(!visionOn) showOut('RoboVision feed unavailable: robot has no reachable LAN/Tailscale address'); });
|
|
5923
|
+
gl.after(vl);
|
|
5924
|
+
}
|
|
5912
5925
|
var pm=$('pk-prodmode'); if(pm) pm.addEventListener('change', function(){ if(rpReadOnly){ pm.checked=!pm.checked; showOut('read-only node'); return; } setProductionMode(n, pm.checked); });
|
|
5913
5926
|
var svcCopy=$('pk-svc-clicmd-copy'); if(svcCopy) svcCopy.addEventListener('click', function(){ var i=$('pk-svc-clicmd'); i.select(); try{document.execCommand('copy');}catch(e){} showOut('command copied — run it on the robot itself'); });
|
|
5914
5927
|
var svcList=$('pk-svc-list'); if(svcList) svcList.addEventListener('click', function(ev){
|
package/package.json
CHANGED