@andrian.yablonskyy/thub-agent 1.1.21 → 1.1.22
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.
- package/package.json +1 -1
- package/src/cli.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrian.yablonskyy/thub-agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "TestHub Agent CLI — the single entry point CI/CD and developers use to submit and follow test jobs",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Andrian Yablonskyy <andrian.yablonskyy@gmail.com>",
|
package/src/cli.js
CHANGED
|
@@ -514,10 +514,19 @@ program
|
|
|
514
514
|
session.on('status', (s) => {
|
|
515
515
|
until = s.until;
|
|
516
516
|
});
|
|
517
|
+
// The camera's state on the Client (README §5.7): said when it changes.
|
|
518
|
+
const cameraState = (c) => (c ? (c.streaming ? 'streaming' : c.error ? `not streaming — ${c.error}` : 'starting…') : null);
|
|
519
|
+
let lastCamera = null;
|
|
517
520
|
session.on('devices', (devices) => {
|
|
521
|
+
const camera = cameraState(devices.camera);
|
|
518
522
|
if (listening){
|
|
523
|
+
if (camera && camera !== lastCamera){
|
|
524
|
+
log(`Video: ${camera}`);
|
|
525
|
+
}
|
|
526
|
+
lastCamera = camera;
|
|
519
527
|
return;
|
|
520
528
|
}
|
|
529
|
+
lastCamera = camera;
|
|
521
530
|
listening = (async () => {
|
|
522
531
|
const local = await listenLocal(session, devices, {
|
|
523
532
|
host: opts.bind, uartBase: opts.uartPort, gdbBase: opts.gdbPort, target: opts.target, log
|
|
@@ -579,7 +588,9 @@ function printConnection(name, link, until, ports, devices, opts, video){
|
|
|
579
588
|
}
|
|
580
589
|
}
|
|
581
590
|
if (video){
|
|
582
|
-
|
|
591
|
+
const c = devices.camera,
|
|
592
|
+
state = c.streaming === false && c.error ? ` (not streaming — ${c.error})` : c.streaming === false ? ' (starting…)' : '';
|
|
593
|
+
lines.push(`Video ${c.name} H.264 (MPEG-TS) ${video.url}${state}`,
|
|
583
594
|
` vlc ${video.url} · ffplay -fflags nobuffer ${video.url}` +
|
|
584
595
|
(video.udp ? `\n UDP: ${video.udp} (ffplay -fflags nobuffer ${video.udp})` : ' · UDP too: --video-udp 5600'));
|
|
585
596
|
}
|