This commit is contained in:
trung09122002
2026-09-20 15:14:17 +07:00
parent 1ff3dccba9
commit 0c33efea2f
4 changed files with 66 additions and 5 deletions

View File

@@ -111,7 +111,8 @@ public:
// "count". Ban goc chi co getActualRPM() -- tuc chi co van toc, va tich
// phan van toc thi lo mot mau telemetry la mat vinh vien mot doan quang
// duong ma khong phat hien duoc. Xem thirdparty/PROVENANCE.md.
bool getPositionCounts(int32_t& out_left, int32_t& out_right);
bool getPositionCounts(int32_t& out_left, int32_t& out_right,
double* out_skew_sec = nullptr);
bool isReady() const { return hardware_ready_.load(); }
bool hasConnectionLost() const { return connection_lost_.load(); }
@@ -154,6 +155,8 @@ private:
std::atomic<int32_t> cached_left_pos_raw_{0};
std::atomic<int32_t> cached_right_pos_raw_{0};
std::atomic<bool> cached_pos_valid_{false};
// [vslam] Banh phai lay mau muon hon banh trai bay nhieu giay.
std::atomic<double> cached_pos_skew_sec_{0.0};
void telemetryLoop();
// Target caching