From d11d86aac76679041f836125215016ccd4c10f15 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 14 Mar 2008 00:26:08 +0100 Subject: * digital/asserv/src/asserv: - moved position control parameters to a structure. --- digital/asserv/src/asserv/speed.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'digital/asserv/src/asserv/speed.c') 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; } -- cgit v1.2.3