summaryrefslogtreecommitdiff
path: root/n/asserv/src/taz.c
diff options
context:
space:
mode:
authorschodet2005-05-01 15:36:43 +0000
committerschodet2005-05-01 15:36:43 +0000
commit714e86c96ff93fb78d4340cb607c12927091417b (patch)
treef28de78f252dc450550151c6324f1e44b4633473 /n/asserv/src/taz.c
parent7bed3836db97e3c626a604cbe8b10c49236bb724 (diff)
Ajout de e_sat.
Ajout de moyenage de d. Ajout d'un print des paramètres. Mesures des robot. Période d'asservissement 1.1 ms. PWM à 14KHz.
Diffstat (limited to 'n/asserv/src/taz.c')
-rw-r--r--n/asserv/src/taz.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/n/asserv/src/taz.c b/n/asserv/src/taz.c
index 8aba939..60c8330 100644
--- a/n/asserv/src/taz.c
+++ b/n/asserv/src/taz.c
@@ -32,10 +32,12 @@ uint8_t taz_max_state = 0xff;
uint8_t taz_max_substate;
/** Positions. */
-//#define taz_scale (1.0/0.05026548245743669181)
-//#define taz_scale (1.0/.05090591755319148936)
-//#define taz_scale (1.0/.05132374757503138194)
-#define taz_scale (1.0/.05124525981346725427)
+/********************************
+ * *
+ * !!! LES Y SONT NGATIFS !!! *
+ * *
+ ********************************/
+#define taz_scale (1.0/.05077874252508530693)
static const uint32_t taz_rear_angle = 0x00ff90bf;
static const uint16_t taz_rear_16 = taz_scale * 270 / 2;
static const uint32_t taz_rear_32 = taz_scale * 270 / 2 * 256;
@@ -229,13 +231,13 @@ taz_state_1 (void)
taz_substate = 2;
break;
}
- /* Direction l'axe des y. */
if (taz_pont == 0)
{
taz_substate = 10;
}
else
{
+ /* Direction l'axe des y. */
taz_substate = 6;
motor_mode = 2;
goto_mode = 1;
@@ -273,7 +275,7 @@ taz_state_1 (void)
motor_mode = 2;
goto_mode = 0;
goto_sign = 0;
- goto_d = taz_start_y_16 + taz_pont * taz_brige_interval_16 -
+ goto_d = taz_start_y_16 + taz_pont * taz_brige_interval_16 +
(postrack_y >> 8);
goto_x = postrack_x;
goto_y = postrack_y;