Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
BSP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PolySTAR
RoboMaster
Controle-et-Systeme
BSP
Commits
645a1cb8
Commit
645a1cb8
authored
5 years ago
by
Nathan Girard
Browse files
Options
Downloads
Patches
Plain Diff
position m3508 + correction numero roues
parent
d7f73924
No related branches found
Branches containing commit
No related tags found
2 merge requests
!6
Position m3508 + cleaning bsp
,
!5
position m3508 + correction numero roues
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Device/list_motor.c
+16
-7
16 additions, 7 deletions
Device/list_motor.c
Device/motor.c
+5
-0
5 additions, 0 deletions
Device/motor.c
with
21 additions
and
7 deletions
Device/list_motor.c
+
16
−
7
View file @
645a1cb8
...
@@ -129,15 +129,24 @@ void motors_all_init(void){
...
@@ -129,15 +129,24 @@ void motors_all_init(void){
motors_init
(
&
gm6020_up
,
0x205
,
GM6020
);
motors_init
(
&
gm6020_up
,
0x205
,
GM6020
);
motors_init
(
&
m3508_frontleft
,
0x201
,
M3508
);
motors_init
(
&
m3508_frontleft
,
0x201
,
M3508
);
motors_init
(
&
m3508_frontright
,
0x202
,
M3508
);
motors_init
(
&
m3508_frontright
,
0x202
,
M3508
);
motors_init
(
&
m3508_back
lef
t
,
0x203
,
M3508
);
motors_init
(
&
m3508_back
righ
t
,
0x203
,
M3508
);
motors_init
(
&
m3508_back
righ
t
,
0x204
,
M3508
);
motors_init
(
&
m3508_back
lef
t
,
0x204
,
M3508
);
gm6020_up
.
MIN_POSITION
=
5565
;
// Paramtres ICRA
gm6020_up
.
MAX_POSITION
=
6675
;
// gm6020_up.MIN_POSITION = 5565;
gm6020_down
.
MIN_POSITION
=
2519
;
// gm6020_up.MAX_POSITION = 6675;
gm6020_down
.
MAX_POSITION
=
7015
;
// gm6020_up.target = 6200;
// gm6020_down.MIN_POSITION = 2519;
// gm6020_down.MAX_POSITION = 7015;
// gm6020_down.target = 4750;
// Paramtres StandardMeca
gm6020_up
.
MIN_POSITION
=
2220
;
gm6020_up
.
MAX_POSITION
=
3840
;
gm6020_up
.
target
=
3450
;
gm6020_down
.
MIN_POSITION
=
2800
;
gm6020_down
.
MAX_POSITION
=
6700
;
gm6020_down
.
target
=
4750
;
gm6020_down
.
target
=
4750
;
gm6020_up
.
target
=
6200
;
}
}
This diff is collapsed.
Click to expand it.
Device/motor.c
+
5
−
0
View file @
645a1cb8
...
@@ -92,7 +92,12 @@ void set_motor_speed(motor_t *motor)
...
@@ -92,7 +92,12 @@ void set_motor_speed(motor_t *motor)
float
target
=
motor
->
target
;
float
target
=
motor
->
target
;
switch
(
motor
->
type
){
switch
(
motor
->
type
){
case
M3508
:
case
M3508
:
if
((
target
<
100
.
0
)
&&
(
target
>
-
100
.
0
)){
run_motor_from_command
(
motor
,
motor
->
pid_pos
,
target
,
motor
->
info
.
M3508_info
.
angle
);
}
else
{
run_motor_from_command
(
motor
,
motor
->
pid_speed
,
target
,
motor
->
info
.
M3508_info
.
speed
);
run_motor_from_command
(
motor
,
motor
->
pid_speed
,
target
,
motor
->
info
.
M3508_info
.
speed
);
}
case
GM6020
:
case
GM6020
:
run_motor_from_command
(
motor
,
motor
->
pid_speed
,
target
,
motor
->
info
.
GM6020_info
.
speed
);
run_motor_from_command
(
motor
,
motor
->
pid_speed
,
target
,
motor
->
info
.
GM6020_info
.
speed
);
case
M2006
:
case
M2006
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment