feat(k1): add USB networking, device management and acquisition recovery
This commit is contained in:
@@ -49,7 +49,7 @@ test('source age expires even when metadata repeats, old frames never look live'
|
||||
assert.equal(gate.fresh,false);
|
||||
gate.receive({type:'lidar-state',sequence:1,age_ms:250,points:3});
|
||||
assert.equal(gate.fresh,true);assert.equal(gate.points,3);
|
||||
now+=1800;gate.receive({type:'lidar-state',sequence:1,age_ms:0,points:3});
|
||||
now+=4800;gate.receive({type:'lidar-state',sequence:1,age_ms:0,points:3});
|
||||
assert.equal(gate.fresh,false);
|
||||
gate.receive({type:'lidar-state',sequence:2,age_ms:9000,points:3});
|
||||
assert.equal(gate.fresh,false);
|
||||
@@ -58,6 +58,19 @@ test('source age expires even when metadata repeats, old frames never look live'
|
||||
assert.throws(()=>gate.receive({type:'lidar-state',sequence:4,age_ms:-1,points:4}));
|
||||
});
|
||||
|
||||
test('budgeted cloud accepts a three-second delivery without making an old frame live forever',()=>{
|
||||
let now=10000;const gate=previewFreshness(()=>now);
|
||||
gate.receive({type:'lidar-state',sequence:1,age_ms:3000,points:394});
|
||||
assert.equal(gate.fresh,true);
|
||||
now+=1999;assert.equal(gate.fresh,true);
|
||||
gate.receive({type:'lidar-state',sequence:1,age_ms:0,points:394});
|
||||
now++;assert.equal(gate.fresh,false);
|
||||
gate.receive({type:'lidar-state',sequence:2,age_ms:null,points:394});
|
||||
assert.equal(gate.fresh,false);
|
||||
gate.receive({type:'lidar-state',sequence:3,age_ms:5000,points:394});
|
||||
assert.equal(gate.fresh,false);
|
||||
});
|
||||
|
||||
test('onboard camera admits immediate sourceopen and ignores callbacks after close',()=>{
|
||||
const saved={media:globalThis.MediaSource,create:URL.createObjectURL,revoke:URL.revokeObjectURL};
|
||||
let source,buffer,appended=0,ready=0,failed=0;
|
||||
|
||||
Reference in New Issue
Block a user