summaryrefslogtreecommitdiffhomepage
path: root/digital/asserv/src/asserv/traj.c
diff options
context:
space:
mode:
authorNicolas Schodet2008-03-14 00:26:41 +0100
committerNicolas Schodet2008-03-14 00:26:41 +0100
commitfc9956a4b1858d490a195eae4574bfa4d18b066f (patch)
treeadeddb77a5f2fabdc22e4fc81c880b80e1b0090a /digital/asserv/src/asserv/traj.c
parentd11d86aac76679041f836125215016ccd4c10f15 (diff)
* digital/asserv/src/asserv:
- moved speed control state to structures.
Diffstat (limited to 'digital/asserv/src/asserv/traj.c')
-rw-r--r--digital/asserv/src/asserv/traj.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/digital/asserv/src/asserv/traj.c b/digital/asserv/src/asserv/traj.c
index fc41d3a5..226430a2 100644
--- a/digital/asserv/src/asserv/traj.c
+++ b/digital/asserv/src/asserv/traj.c
@@ -46,29 +46,29 @@ static void
traj_ftw (void)
{
int16_t speed;
- speed = speed_theta_slow;
+ speed = speed_theta.slow;
speed *= 256;
if (PINC & _BV (0) && PINC & _BV (1))
{
- speed_theta_cons = -speed;
- speed_alpha_cons = 0;
+ speed_theta.cons = -speed;
+ speed_alpha.cons = 0;
}
else if (PINC & _BV (0))
{
- speed_theta_cons = -speed / 2;
- speed_alpha_cons = speed / 2;
+ speed_theta.cons = -speed / 2;
+ speed_alpha.cons = speed / 2;
}
else if (PINC & _BV (1))
{
- speed_theta_cons = -speed / 2;
- speed_alpha_cons = -speed / 2;
+ speed_theta.cons = -speed / 2;
+ speed_alpha.cons = -speed / 2;
}
else
{
- speed_theta_cons = 0;
- speed_alpha_cons = 0;
- speed_theta_cur = 0;
- speed_alpha_cur = 0;
+ speed_theta.cons = 0;
+ speed_alpha.cons = 0;
+ speed_theta.cur = 0;
+ speed_alpha.cur = 0;
state_finish (&state_main);
traj_mode = 11;
}