summaryrefslogtreecommitdiffhomepage
path: root/digital/asserv/src/asserv/speed.c
diff options
context:
space:
mode:
authorNicolas Schodet2008-03-14 00:26:08 +0100
committerNicolas Schodet2008-03-14 00:26:08 +0100
commitd11d86aac76679041f836125215016ccd4c10f15 (patch)
treeb0d264df533a5210859d45872bccf28ec369ecf5 /digital/asserv/src/asserv/speed.c
parenta0c34f97eec1773195e2b9cf400696d2f91c9ebf (diff)
* digital/asserv/src/asserv:
- moved position control parameters to a structure.
Diffstat (limited to 'digital/asserv/src/asserv/speed.c')
-rw-r--r--digital/asserv/src/asserv/speed.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/digital/asserv/src/asserv/speed.c b/digital/asserv/src/asserv/speed.c
index 887fab11..c2106909 100644
--- a/digital/asserv/src/asserv/speed.c
+++ b/digital/asserv/src/asserv/speed.c
@@ -96,8 +96,8 @@ speed_compute_max_speed (int32_t d, int16_t cur, int16_t acc, int8_t max)
static void
speed_update_by_position (void)
{
- int32_t theta_d = speed_theta_pos_cons - pos_theta_cons;
- int32_t alpha_d = speed_alpha_pos_cons - pos_alpha_cons;
+ int32_t theta_d = speed_theta_pos_cons - pos_theta.cons;
+ int32_t alpha_d = speed_alpha_pos_cons - pos_alpha.cons;
if (theta_d >= -speed_theta_max && theta_d <= speed_theta_max)
speed_theta_cur = theta_d << 8;
else
@@ -122,7 +122,7 @@ speed_update (void)
else
speed_update_by_speed ();
/* Update shaft position. */
- pos_theta_cons += speed_theta_cur >> 8;
- pos_alpha_cons += speed_alpha_cur >> 8;
+ pos_theta.cons += speed_theta_cur >> 8;
+ pos_alpha.cons += speed_alpha_cur >> 8;
}