Fix tracking standby getting stuck

This commit is contained in:
Patrick Nicolas
2024-09-08 17:10:20 +02:00
parent a035578732
commit 4694425373
+4 -5
View File
@@ -91,11 +91,10 @@ void xrt::drivers::wivrn::tracking_control_t::send(wivrn_connection & connection
if (std::chrono::steady_clock::now() < next_sample) if (std::chrono::steady_clock::now() < next_sample)
return; return;
if (auto offset = max.exchange(0)) connection.send_stream(to_headset::tracking_control{
connection.send_stream(to_headset::tracking_control{ .offset = std::chrono::nanoseconds(max.exchange(0)),
.offset = std::chrono::nanoseconds(offset), .enabled = enabled,
.enabled = enabled, });
});
next_sample += std::chrono::seconds(1); next_sample += std::chrono::seconds(1);
} }