diff --git a/src/main.zig b/src/main.zig index df49d65..ff89976 100644 --- a/src/main.zig +++ b/src/main.zig @@ -529,8 +529,9 @@ pub fn main() !void { try stdout.print("ā³ Waiting up to 20 seconds for device to respond...\n", .{}); try stdout.flush(); - for (0..4) |i| { - std.Thread.sleep(5 * std.time.ns_per_s); + const max = 10; + for (0..10) |i| { + std.Thread.sleep((20 / max) * std.time.ns_per_s); var post_command_state = try getRecirculationStatus( allocator, @@ -539,7 +540,7 @@ pub fn main() !void { ); defer post_command_state.deinit(); const enabled = post_command_state.recirculation_enabled != null and post_command_state.recirculation_enabled.?; - if (i == 4 or enabled) { + if (i == 10 or enabled) { try stdout.print("\n{f}", .{post_command_state}); if (enabled) try stdout.writeAll("\nšŸ‘ Recirculation enabled!\n");