Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
ad5dc87e
Commit
ad5dc87e
authored
Nov 28, 2013
by
Jeroen Vreeken
Browse files
t_max_a is placed on the wrong place.
parent
898f22c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
controller/block/block_setpoint_generator.c
View file @
ad5dc87e
...
...
@@ -218,6 +218,7 @@ static void setpoint_generator_calculate(struct controller_block *spg)
{
struct
controller_block_private
*
priv
=
spg
->
private
;
double
cur_x
,
cur_v
;
double
t_max_a
;
bool
ignore_x
=
false
;
bool
must_brake
=
false
;
bool
good_x
;
...
...
@@ -226,6 +227,8 @@ static void setpoint_generator_calculate(struct controller_block *spg)
cur_x
=
priv
->
cur_x
;
cur_v
=
priv
->
cur_v
;
t_max_a
=
priv
->
t_max_a
;
if
(
*
priv
->
reset
)
{
priv
->
cmd_x
=
*
priv
->
reset_x
;
cur_x
=
priv
->
cmd_x
;
...
...
@@ -332,7 +335,7 @@ static void setpoint_generator_calculate(struct controller_block *spg)
double
error_x_jneg
;
double
error_v
=
priv
->
cmd_v
-
cur_v
;
double
x
,
v
,
a
,
j
,
t
;
double
req_x
,
req_v
,
t_max_a
,
v_delta_from_max_a
;
double
req_x
,
req_v
,
v_delta_from_max_a
;
double
error_v_after_a
,
error_x_at_v
;
double
j_from_pos
;
bool
state_at_max_a
=
false
;
...
...
@@ -365,7 +368,6 @@ static void setpoint_generator_calculate(struct controller_block *spg)
j_from_pos
=
0
;
}
t_max_a
=
priv
->
t_max_a
;
v_delta_from_max_a
=
priv
->
v_delta_from_max_a
;
j
=
copysign
(
priv
->
max_j
,
error_v
);
...
...
Write
Preview
Supports
Markdown
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