V1.2版本增加手柄震动功能,右扳机按下时,触发震动,连接时震动,断开时震动,起立时震动

This commit is contained in:
myperworld committed 2025-10-17 15:43:28 +08:00
1 parent 0ef2bb0d7f
commit c211e9600b
10 files changed
+5 -6129

No files matched your search

+4 -3
View File
@@ -484,12 +484,13 @@ void lqr_balance_loop()
// Serial.print(robot_speed_diff);
// Serial.print(",jump_flag:");
// Serial.println(jump_flag); // 120左右
XboxKeyVibration(); // 落地手柄震动
if( jump_flag ){ // 落地点作为新的位移零点
resetZeroPoint();
}
if( jump_flag == 0){
XboxKeyVibration(); // 大运动状态手柄震动
}
}
last_lqr_speed = LQR_speed; // 每隔100ms更新一次历史转速
last_speed_record_time = current_time; // 更新记录时间