diff --git a/Device/list_motor.c b/Device/list_motor.c index 2dcb2be56d97d8fb9cee67418236056a1fbc2d25..d668d8cc67cfb60b89986a18e6094bd34215d6c1 100644 --- a/Device/list_motor.c +++ b/Device/list_motor.c @@ -132,21 +132,21 @@ void motors_all_init(void){ motors_init(&m3508_backright, 0x203, M3508); motors_init(&m3508_backleft, 0x204, M3508); - // Parametres ICRA - gm6020_up.MIN_POSITION = 5565; - gm6020_up.MAX_POSITION = 6675; - gm6020_down.MIN_POSITION = 2519; - gm6020_down.MAX_POSITION = 7015; - gm6020_down.target = 4750; - gm6020_up.target = 6200; + // Param�tres ICRA +// gm6020_up.MIN_POSITION = 5565; +// gm6020_up.MAX_POSITION = 6675; +// gm6020_up.target = 6200; +// gm6020_down.MIN_POSITION = 2519; +// gm6020_down.MAX_POSITION = 7015; +// gm6020_down.target = 4750; - // Parametres StandarMeca (a changer) - gm6020_up.MIN_POSITION = 2700; - gm6020_up.MAX_POSITION = 4000; - gm6020_up.target = 3500; - gm6020_down.MIN_POSITION = 2220; - gm6020_down.MAX_POSITION = 6800; - gm6020_down.target = 4800; + // Param�tres StandardMeca + gm6020_up.MIN_POSITION = 2220; + gm6020_up.MAX_POSITION = 3840; + gm6020_up.target = 3450; + gm6020_down.MIN_POSITION = 2800; + gm6020_down.MAX_POSITION = 6700; + gm6020_down.target = 4750; } diff --git a/Device/motor.c b/Device/motor.c index 4ea9edbc0c7d5f1afe1f621fd3f5b306cb979783..720826220b50dbb7f532b0e9881da1083278c1ec 100644 --- a/Device/motor.c +++ b/Device/motor.c @@ -92,12 +92,21 @@ void set_motor_speed(motor_t *motor) float target = motor->target; switch(motor->type){ case M3508: +<<<<<<< HEAD if ((target < 150) && (target > -100)){ run_motor_from_command(motor, motor->pid_speed, target, motor->info.M3508_info.speed); } else{ run_motor_from_command(motor, motor->pid_pos, target, motor->info.M3508_info.angle); } +======= + if ((target < 100.0) && (target > -100.0)){ + run_motor_from_command(motor, motor->pid_pos, target, motor->info.M3508_info.angle); + } + else{ + run_motor_from_command(motor, motor->pid_speed, target, motor->info.M3508_info.speed); + } +>>>>>>> 623e9ad5906292f23a358f1ea43fd89ee37f30d3 case GM6020: run_motor_from_command(motor, motor->pid_speed, target, motor->info.GM6020_info.speed); case M2006: