Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
car-controlserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenzhongjian
car-controlserver
Commits
39dea0c6
You need to sign in or sign up before continuing.
Commit
39dea0c6
authored
Mar 09, 2026
by
957dd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了转向最大值
parent
67dda630
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
main
build/main
+0
-0
car0102_control.c
drivers/devicecontrol/car0102_control.c
+4
-4
No files found.
build/main
View file @
39dea0c6
No preview for this file type
drivers/devicecontrol/car0102_control.c
View file @
39dea0c6
...
...
@@ -25,8 +25,8 @@ static int speed_mode = 0; // 0=停止, 1=前进, 2=后退
static
int
speed_timeout
=
0
;
// ===== 方向盘调参区(只建议改这里4个参数) =====
#define STEER_STEP_TURN
1
0 // 转向时每次变化角度(越大越快)
#define STEER_STEP_RETURN
15
// 回正时每次变化角度(一般略大于转向)
#define STEER_STEP_TURN
6
0 // 转向时每次变化角度(越大越快)
#define STEER_STEP_RETURN
90
// 回正时每次变化角度(一般略大于转向)
#define REV_TARGET_SCALE_NUM 6 // 后退目标速度比例: 分子
#define REV_TARGET_SCALE_DEN 10 // 后退目标速度比例: 分母 => 6/10=0.6(慢40%)
#define REV_PWM_GAIN 2 // 后退PWM斜率(越小后退越柔和)
...
...
@@ -285,10 +285,10 @@ static void car0102_steering_angle_smooth_process() {
if
(
steering_mode
==
3
)
{
// 左转: 90 -> 130
wanted_angle
=
90
+
(
input_angle
*
4
0
)
/
180
;
wanted_angle
=
90
+
(
input_angle
*
3
0
)
/
180
;
}
else
if
(
steering_mode
==
4
)
{
// 右转: 90 -> 50
wanted_angle
=
90
-
(
input_angle
*
4
0
)
/
180
;
wanted_angle
=
90
-
(
input_angle
*
3
0
)
/
180
;
}
else
{
wanted_angle
=
90
;
smooth_step
=
STEER_STEP_RETURN
;
// 回正阶段使用更大的步长
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment