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 f1528d4..9ce152f 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 5e2f39a..8c09231 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 c584222..483d4b8 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 804e084..75616f7 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 7af6205..5bd97d3 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 084d2cb..8438f38 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 de3e936..1fb35a7 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 691b8c0..74d116d 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 9736646..c2409a1 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 2538980..22a4acc 100755 (executable)
Binary files a/projects/microb2010/tests/test_board2008/main.bin and b/projects/microb2010/tests/test_board2008/main.bin differ
index 732bd73..c9a3293 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 9945e2c..ffd801e 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 edd795a..2816744 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)