Refactor timeout calculations for repeater and login frames to ensure minimum message size is respected; remove obsolete widget test file.

This commit is contained in:
zjs81
2026-01-11 17:40:19 -07:00
parent b2ce82fe7e
commit 01bd8243da
6 changed files with 22 additions and 21 deletions
+4 -1
View File
@@ -261,9 +261,12 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
await connector.sendFrame(frame);
final pathLengthValue = selection.useFlood ? -1 : selection.hopCount;
final messageBytes = frame.length >= _statusResponseBytes
var messageBytes = frame.length >= _statusResponseBytes
? frame.length
: _statusResponseBytes;
if (messageBytes < maxFrameSize) {
messageBytes = maxFrameSize;
}
final timeoutMs = connector.calculateTimeout(
pathLength: pathLengthValue,
messageBytes: messageBytes,
+4 -1
View File
@@ -121,9 +121,12 @@ class _TelemetryScreenState extends State<TelemetryScreen> {
await connector.sendFrame(frame);
final pathLengthValue = selection.useFlood ? -1 : selection.hopCount;
final messageBytes = frame.length >= _statusResponseBytes
var messageBytes = frame.length >= _statusResponseBytes
? frame.length
: _statusResponseBytes;
if (messageBytes < maxFrameSize) {
messageBytes = maxFrameSize;
}
final timeoutMs = connector.calculateTimeout(
pathLength: pathLengthValue,
messageBytes: messageBytes,