summaryrefslogtreecommitdiffhomepage
path: root/digital/asserv/src/asserv/simu.host.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/asserv/src/asserv/simu.host.c')
-rw-r--r--digital/asserv/src/asserv/simu.host.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/digital/asserv/src/asserv/simu.host.c b/digital/asserv/src/asserv/simu.host.c
index a4b34138..8802257d 100644
--- a/digital/asserv/src/asserv/simu.host.c
+++ b/digital/asserv/src/asserv/simu.host.c
@@ -215,8 +215,13 @@ simu_sensor_update_aquajim (void)
}
/** Top zero sensors. */
double aa = simu_aux_model[0].th / simu_aux_model[0].m.i_G
- - M_PI / 6 - 2 * M_PI / 3
- + 2 * M_PI * 0x43e / simu_robot->aux_encoder_steps[0];
+ /* Almost open. */
+ + 2 * M_PI / 6 / 10
+ /* Turn at the next hole. */
+ - 2 * M_PI / 3
+ /* Mechanical offset. */
+ + 2 * M_PI * 0x43e / simu_robot->aux_encoder_steps[0] /
+ simu_aux_model[0].m.i_G;
double apos = aa / (2 * M_PI / 3);
if (apos - floor (apos) > 0.5)
PINC |= IO_BV (CONTACT_AUX0_ZERO_IO);