From: Olivier Matz Date: Sat, 6 Mar 2010 21:54:18 +0000 (+0100) Subject: test board 2008 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a6b3ca9418e9fb69a32ed2ac81e5fe8b2d439ca7;p=aversive.git test board 2008 --- diff --git a/projects/microb2010/tests/test_board2008/.config b/projects/microb2010/tests/test_board2008/.config index f1528d4..9ce152f 100644 --- a/projects/microb2010/tests/test_board2008/.config +++ b/projects/microb2010/tests/test_board2008/.config @@ -83,6 +83,7 @@ CONFIG_MODULE_CIRBUF=y CONFIG_MODULE_FIXED_POINT=y CONFIG_MODULE_VECT2=y CONFIG_MODULE_GEOMETRY=y +# CONFIG_MODULE_HOSTSIM is not set CONFIG_MODULE_SCHEDULER=y CONFIG_MODULE_SCHEDULER_STATS=y # CONFIG_MODULE_SCHEDULER_CREATE_CONFIG is not set @@ -169,9 +170,10 @@ CONFIG_MODULE_ENCODERS_MICROB_CREATE_CONFIG=y # CONFIG_MODULE_ENCODERS_SPI_CREATE_CONFIG is not set # -# Robot specific modules +# Robot specific modules (fixed point lib may be needed) # CONFIG_MODULE_ROBOT_SYSTEM=y +# CONFIG_MODULE_ROBOT_SYSTEM_USE_F64 is not set # CONFIG_MODULE_ROBOT_SYSTEM_MOT_AND_EXT is not set CONFIG_MODULE_POSITION_MANAGER=y CONFIG_MODULE_COMPENSATE_CENTRIFUGAL_FORCE=y diff --git a/projects/microb2010/tests/test_board2008/actuator.c b/projects/microb2010/tests/test_board2008/actuator.c index 5e2f39a..8c09231 100644 --- a/projects/microb2010/tests/test_board2008/actuator.c +++ b/projects/microb2010/tests/test_board2008/actuator.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include @@ -51,7 +51,7 @@ static volatile uint8_t fessor_state = OFF; static volatile uint32_t fessor_pos_up = 35000; -static volatile uint32_t fessor_pos_down = 63500; +static volatile uint32_t fessor_pos_down = 0; static volatile uint32_t fessor_delay_up = 500; static volatile uint32_t fessor_delay_down = 2000; static volatile uint32_t delay = 0; diff --git a/projects/microb2010/tests/test_board2008/cmdline.c b/projects/microb2010/tests/test_board2008/cmdline.c index c584222..483d4b8 100644 --- a/projects/microb2010/tests/test_board2008/cmdline.c +++ b/projects/microb2010/tests/test_board2008/cmdline.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/commands_ax12.c b/projects/microb2010/tests/test_board2008/commands_ax12.c index 804e084..75616f7 100644 --- a/projects/microb2010/tests/test_board2008/commands_ax12.c +++ b/projects/microb2010/tests/test_board2008/commands_ax12.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/commands_cs.c b/projects/microb2010/tests/test_board2008/commands_cs.c index 7af6205..5bd97d3 100644 --- a/projects/microb2010/tests/test_board2008/commands_cs.c +++ b/projects/microb2010/tests/test_board2008/commands_cs.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/commands_gen.c b/projects/microb2010/tests/test_board2008/commands_gen.c index 084d2cb..8438f38 100644 --- a/projects/microb2010/tests/test_board2008/commands_gen.c +++ b/projects/microb2010/tests/test_board2008/commands_gen.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/commands_mainboard.c b/projects/microb2010/tests/test_board2008/commands_mainboard.c index de3e936..1fb35a7 100644 --- a/projects/microb2010/tests/test_board2008/commands_mainboard.c +++ b/projects/microb2010/tests/test_board2008/commands_mainboard.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/commands_traj.c b/projects/microb2010/tests/test_board2008/commands_traj.c index 691b8c0..74d116d 100644 --- a/projects/microb2010/tests/test_board2008/commands_traj.c +++ b/projects/microb2010/tests/test_board2008/commands_traj.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/cs.c b/projects/microb2010/tests/test_board2008/cs.c index 9736646..c2409a1 100644 --- a/projects/microb2010/tests/test_board2008/cs.c +++ b/projects/microb2010/tests/test_board2008/cs.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include @@ -99,15 +99,16 @@ static void do_cs(void *dummy) cs_manage(&mainboard.angle.cs); if (mainboard.distance.on) cs_manage(&mainboard.distance.cs); - if (mainboard.fessor.on) + if (mainboard.fessor.on) { cs_manage(&mainboard.fessor.cs); + fessor_manage(); + } if (mainboard.wheel.on) cs_manage(&mainboard.wheel.cs); - if (mainboard.elevator.on) + if (mainboard.elevator.on) { cs_manage(&mainboard.elevator.cs); - - fessor_manage(); - elevator_manage(); + elevator_manage(); + } } if ((cpt & 1) && (mainboard.flags & DO_POS)) { /* about 1.5ms (worst case without centrifugal force @@ -305,7 +306,7 @@ void microb_cs_init(void) mainboard.angle.on = 0; mainboard.distance.on = 0; mainboard.fessor.on = 1; - mainboard.elevator.on = 1; + mainboard.elevator.on = 0; mainboard.wheel.on = 1; mainboard.flags |= DO_CS; diff --git a/projects/microb2010/tests/test_board2008/main.bin b/projects/microb2010/tests/test_board2008/main.bin index 2538980..22a4acc 100755 Binary files a/projects/microb2010/tests/test_board2008/main.bin and b/projects/microb2010/tests/test_board2008/main.bin differ diff --git a/projects/microb2010/tests/test_board2008/main.c b/projects/microb2010/tests/test_board2008/main.c index 732bd73..c9a3293 100755 --- a/projects/microb2010/tests/test_board2008/main.c +++ b/projects/microb2010/tests/test_board2008/main.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/strat_base.c b/projects/microb2010/tests/test_board2008/strat_base.c index 9945e2c..ffd801e 100644 --- a/projects/microb2010/tests/test_board2008/strat_base.c +++ b/projects/microb2010/tests/test_board2008/strat_base.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/projects/microb2010/tests/test_board2008/strat_utils.c b/projects/microb2010/tests/test_board2008/strat_utils.c index edd795a..2816744 100644 --- a/projects/microb2010/tests/test_board2008/strat_utils.c +++ b/projects/microb2010/tests/test_board2008/strat_utils.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include @@ -77,17 +77,17 @@ int16_t simple_modulo_360(int16_t a) return a; } -/** do a modulo 2.pi -> [-Pi,+Pi], knowing that 'a' is in [-3Pi,+3Pi] */ -double simple_modulo_2pi(double a) -{ - if (a < -M_PI) { - a += M_2PI; - } - else if (a > M_PI) { - a -= M_2PI; - } - return a; -} +/* /\** do a modulo 2.pi -> [-Pi,+Pi], knowing that 'a' is in [-3Pi,+3Pi] *\/ */ +/* double simple_modulo_2pi(double a) */ +/* { */ +/* if (a < -M_PI) { */ +/* a += M_2PI; */ +/* } */ +/* else if (a > M_PI) { */ +/* a -= M_2PI; */ +/* } */ +/* return a; */ +/* } */ /* return the distance to a point in the area */ int16_t angle_abs_to_rel(int16_t a_abs)