main
John Lauer
Adopt board28 low-voltage Q3/Q4 replacements with native evidence and recorded review; preserve qualification gates
2c70410
"""Record a real native viewer tour of the isolated, unadopted library candidate."""
from pathlib import Path
import json,subprocess,time
root=Path(__file__).resolve().parents[1];out=root/'videos/release-fet-candidate';out.mkdir(exist_ok=True);hwnd=57284904
def call(v,a,label):
p=subprocess.run(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load',v,json.dumps(a)],capture_output=True,text=True);d=json.loads(p.stdout);(out/(label+'.json')).write_text(json.dumps(d,indent=2)+'\n');assert p.returncode==0 and d.get('success',d.get('ok',True)),d;return d
call('kicad_3d_view',{'hwnd':hwnd,'action':'view_top'},'top')
call('kicad_3d_view',{'hwnd':hwnd,'action':'fit'},'fit')
call('kicad_3d_view',{'hwnd':hwnd,'action':'zoom_out','count':2},'margin')
r=call('desktop_record_window_start',{'hwnd':hwnd,'fps':30,'cursor':False,'audio':False,'maxDurationMs':60000,'reason':'Requested process footage: low-voltage specified Q3 and Q4 replacement models in a library review candidate in native KiCad, not a fabrication release'},'record-start')
try:
time.sleep(1.5)
call('kicad_3d_view',{'hwnd':hwnd,'action':'tour','pauseMs':650,'steps':[['rotate_x_cw',3],['rotate_z_cw',10],['rotate_z_ccw',6]]},'tour')
time.sleep(1.5)
finally:
s=call('desktop_record_stop',{'recordingId':r['recordingId']},'record-stop')
for i in range(5):
if not s.get('stillRunning') and s.get('state')!='finalising':break
time.sleep(2);s=call('desktop_record_status',{'recordingId':r['recordingId']},f'finalize-{i}')
assert not s.get('stillRunning') and s.get('state')!='finalising',s
call('pull_file',{'filePaths':[s.get('path',r['path'])],'saveTo':str(out)},'record-pull')
print('Native candidate take captured; video frame review pending')