drivers: IMU WT61PC noi thang UART (mcu.protocol: wt61pc), bo ESP32 -- doc quyen cong, tach khung co resync, canh bao khi im

This commit is contained in:
trung09122002
2026-10-02 14:01:19 +07:00
parent a8388102d8
commit be2aa17e3e
13 changed files with 1088 additions and 8 deletions

View File

@@ -175,7 +175,17 @@ struct CameraConfig {
// --- MCU: IMU + barometer --------------------------------------------------
// Cach IMU noi vao may.
enum class McuProtocol {
// ESP32-S3 + WT61PC, text qua USB-CDC (/dev/ttyACM0). Xem mcu_bridge.cc.
kEspText,
// WT61PC noi THANG UART hoac cap USB-FTDI (/dev/imu), khung nhi phan 0x55.
// Khong con ESP32, khong co ClockSync. Xem wt61pc_bridge.cc.
kWt61pc,
};
struct McuConfig {
McuProtocol protocol = McuProtocol::kEspText;
std::string port = "/dev/ttyACM0";
// 115200, theo firmware that (base_kit/src/imu_uart). Gia tri cu o day la
// 921600 -- doc sai baud thi ra rac chu khong ra loi, nen no im lang.
@@ -219,6 +229,10 @@ struct McuConfig {
double baro_variance = 9.0;
double read_timeout_sec = 1.0;
// Chi cho kWt61pc: khong co khung hop le nao trong chung nay (giay) thi WARN
// kem goi y. Cam bien 10 Hz nen 2 s la mat ~20 khung, khong con la jitter.
double no_data_warn_sec = 2.0;
};
// --- Base: encoder + motor -------------------------------------------------