fix: increase hwpod-node UART maxBytes default from 4096 to 16384
This commit is contained in:
@@ -808,6 +808,7 @@ async function uartRead(args: any) {
|
||||
};
|
||||
}
|
||||
const limit = Math.max(1, Math.min(numberValue(args.limit) ?? Math.ceil((numberValue(args.maxBytes) ?? 4096) / 80), 200));
|
||||
const maxBytes = numberValue(args.maxBytes) ?? 16384;
|
||||
const fetchArgs = ["fetch", "-l", String(limit), "--session-only", ...(text(args.since) ? ["-s", text(args.since)] : [])];
|
||||
const fetch = await runSerialMonitor(commandBase, fetchArgs, { cwd: serialMonitorDir, timeoutMs });
|
||||
const fetchBody = parseJsonMaybe(fetch.stdout);
|
||||
@@ -820,7 +821,6 @@ async function uartRead(args: any) {
|
||||
};
|
||||
}
|
||||
const rows = Array.isArray(fetchBody.data) ? fetchBody.data : [];
|
||||
const maxBytes = numberValue(args.maxBytes) ?? 4096;
|
||||
const joined = rows.map((row: any) => text(row?.data)).filter(Boolean).join("\n");
|
||||
const truncatedText = joined.length > maxBytes ? joined.slice(0, maxBytes) : joined;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user