]> git.droids-corp.org - aversive.git/commitdiff
test board 2008
authorOlivier Matz <zer0@droids-corp.org>
Sat, 6 Mar 2010 21:54:18 +0000 (22:54 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sat, 6 Mar 2010 21:54:18 +0000 (22:54 +0100)
13 files changed:
projects/microb2010/tests/test_board2008/.config
projects/microb2010/tests/test_board2008/actuator.c
projects/microb2010/tests/test_board2008/cmdline.c
projects/microb2010/tests/test_board2008/commands_ax12.c
projects/microb2010/tests/test_board2008/commands_cs.c
projects/microb2010/tests/test_board2008/commands_gen.c
projects/microb2010/tests/test_board2008/commands_mainboard.c
projects/microb2010/tests/test_board2008/commands_traj.c
projects/microb2010/tests/test_board2008/cs.c
projects/microb2010/tests/test_board2008/main.bin
projects/microb2010/tests/test_board2008/main.c
projects/microb2010/tests/test_board2008/strat_base.c
projects/microb2010/tests/test_board2008/strat_utils.c

index f1528d4bc61c87a8588924d38539a42c2df7d1d4..9ce152f04a03c624e9a845a9cd5d7e669b4992ef 100644 (file)
@@ -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
index 5e2f39a67b0c26f0909750df97d0b54b641efc21..8c09231d12d97b3bc73a050571e84a32da0ac28e 100644 (file)
@@ -29,7 +29,7 @@
 #include <pwm_ng.h>
 #include <timer.h>
 #include <scheduler.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
@@ -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;
index c584222b1407d1f89a94d8b46cd692e52c0c0ce8..483d4b8284ad5b1363dd239a2af66b47ecb2924a 100644 (file)
@@ -30,7 +30,7 @@
 #include <rdline.h>
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
index 804e084d35424c8847e1de87b8a3d167415edb49..75616f764c6f31a17de46790a155d03ce19b0fa4 100644 (file)
@@ -30,7 +30,7 @@
 #include <ax12.h>
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
index 7af6205c8ba7d35c1d3f666126dba76d93b82fd9..5bd97d363c8fd9753c730fc576b7276866337e3c 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
index 084d2cbf716bec44403759cafd41f49d2e31a74a..8438f3844dd43ec00a995bac84cea3d063ec17e0 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 #include <encoders_microb.h>
 #include <adc.h>
 
index de3e936fa291957e830d74f39c1b92083c9820ba..1fb35a78d80e357b382ec9787b1e20718bd80aab 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
index 691b8c073861b2b9ee548383b82b99dd0ec8f7bc..74d116de5baec86332255549be6caa4317d2b50a 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 #include <encoders_microb.h>
 
 #include <pid.h>
index 97366469350aa7056cfd3b566a5a7e5c51bfe340..c2409a12c6d27162ed14e81288bdba25a761b647 100644 (file)
@@ -31,7 +31,7 @@
 #include <pwm_ng.h>
 #include <timer.h>
 #include <scheduler.h>
-#include <time.h>
+#include <clock_time.h>
 #include <adc.h>
 
 #include <pid.h>
@@ -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;
 
index 253898008afc991e16a3e58d0888d4e3c8562e64..22a4acca72a0b5fbf29ef77e5aecdc5de24297fd 100755 (executable)
Binary files a/projects/microb2010/tests/test_board2008/main.bin and b/projects/microb2010/tests/test_board2008/main.bin differ
index 732bd737b47285f98860e69849bb1b3e4c65ecca..c9a3293071b9c1028b486625510f24690466a8a9 100755 (executable)
@@ -33,7 +33,7 @@
 #include <pwm_ng.h>
 #include <timer.h>
 #include <scheduler.h>
-#include <time.h>
+#include <clock_time.h>
 #include <adc.h>
 
 #include <pid.h>
index 9945e2cc6b0251eec0f493f2cd6a07ed1699c716..ffd801ed83d5b7ab2c2e1532ef2b715bdd889e88 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
index edd795a2791d38e217e652687897f635ddf66934..2816744e85373d609172e08bee1b908ad078acf2 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <uart.h>
 #include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
 
 #include <pid.h>
 #include <quadramp.h>
@@ -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)