check every 2 seconds instead
This commit is contained in:
parent
4661ce2354
commit
707998df47
1 changed files with 4 additions and 3 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue