paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5491] ap - tunnel - sim


From: Christophe De Wagter
Subject: [paparazzi-commits] [5491] ap - tunnel - sim
Date: Thu, 19 Aug 2010 18:47:19 +0000

Revision: 5491
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5491
Author:   dewagter
Date:     2010-08-19 18:47:18 +0000 (Thu, 19 Aug 2010)
Log Message:
-----------
ap - tunnel - sim

Modified Paths:
--------------
    paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml
    paparazzi3/trunk/conf/airframes/microjet5.xml
    paparazzi3/trunk/conf/autopilot/fixedwing.makefile
    paparazzi3/trunk/conf/autopilot/setup.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile
    paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/navigation.makefile
    paparazzi3/trunk/conf/boards/tiny_2.11.makefile
    paparazzi3/trunk/sw/tools/gen_aircraft.ml

Modified: paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml        
2010-08-19 15:39:05 UTC (rev 5490)
+++ paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml        
2010-08-19 18:47:18 UTC (rev 5491)
@@ -161,12 +161,16 @@
   </section>
 
   <firmware name="fixedwing">
-    <target name="sim"                         board="pc" />
+    <target name="sim"                         board="pc" >
+      <define name="TRAFFIC_INFO" />
+    </target>
     <target name="ap"                  board="tiny_2.11">
       <param name="FLASH_MODE"                 value="IAP" />
       <define name="AGR_CLIMB" />
       <define name="LOITER_TRIM" />
       <define name="WIND_INFO" />
+      <define name="TRAFFIC_INFO" />
+      <define name="ALT_KALMAN" />
     </target>
 
     <subsystem name="radio_control"    type="ppm"/>
@@ -190,18 +194,12 @@
 
   </firmware>
 
-<!--
+
   <firmware name="setup">
     <target name="tunnel"              board="tiny_2.11" />
     <target name="setup_actuators"     board="tiny_2.11" />
   </firmware>
--->
 
 
- <makefile location="after">
 
-ap.CFLAGS += -DTRAFFIC_INFO -DALT_KALMAN
-sim.CFLAGS += -DTRAFFIC_INFO
-
-  </makefile>
 </airframe>

Modified: paparazzi3/trunk/conf/airframes/microjet5.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/microjet5.xml       2010-08-19 15:39:05 UTC 
(rev 5490)
+++ paparazzi3/trunk/conf/airframes/microjet5.xml       2010-08-19 18:47:18 UTC 
(rev 5491)
@@ -7,11 +7,11 @@
 -->
 
 <airframe name="Microjet 5 Tiny 2.11">
-
+<!--
   <target name="fixedwing" board="tiny_2.11">
     <subsystem name="radio_control" type="ppm"/>
   </target>
-
+-->
   <servos>
     <servo name="MOTOR"         no="0" min="1000" neutral="1000" max="2000"/>
     <servo name="AILEVON_LEFT"  no="2" min="1130" neutral="1575" max="1880"/>

Modified: paparazzi3/trunk/conf/autopilot/fixedwing.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/fixedwing.makefile  2010-08-19 15:39:05 UTC 
(rev 5490)
+++ paparazzi3/trunk/conf/autopilot/fixedwing.makefile  2010-08-19 18:47:18 UTC 
(rev 5491)
@@ -17,7 +17,5 @@
 
 
 # Standard Fixed Wing Code
-
 include $(CFG_FIXEDWING)/autopilot.makefile
-include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
 

Modified: paparazzi3/trunk/conf/autopilot/setup.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/setup.makefile      2010-08-19 15:39:05 UTC 
(rev 5490)
+++ paparazzi3/trunk/conf/autopilot/setup.makefile      2010-08-19 18:47:18 UTC 
(rev 5491)
@@ -1,23 +1,25 @@
 #
-# fixed_wings.makefile
+# setup.makefile
 #
 #
 
 
-CFG_FIXEDWING=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/fixedwing
+CFG_SETUP=$(PAPARAZZI_SRC)/conf/autopilot/subsystems/SETUP
 
 
-SRC_FIXEDWING=.
-SRC_FIXEDWING_ARCH=$(SRC_FIXEDWING)/$(ARCH)
-SRC_FIXEDWING_TEST=$(SRC_FIXEDWING)/
+SRC_SETUP=.
+SRC_SETUP_ARCH=$(SRC_SETUP)/$(ARCH)
+SRC_SETUP_TEST=$(SRC_SETUP)/
 
-FIXEDWING_INC = -I$(SRC_FIXEDWING) -I$(SRC_FIXEDWING_ARCH)
+SETUP_INC = -I$(SRC_SETUP) -I$(SRC_SETUP_ARCH)
 
 
 
 
-# Standard Fixed Wing Code
 
-include $(CFG_FIXEDWING)/autopilot.makefile
-include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
+# a test program to tunnel between both uart
 
+tunnel.CFLAGS += -DFBW -DBOARD_CONFIG=\"tiny_2_1_1_usb.h\" -DLED
+tunnel.srcs += $(SRC_ARCH)/uart_tunnel.c
+
+

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile     
2010-08-19 15:39:05 UTC (rev 5490)
+++ paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/autopilot.makefile     
2010-08-19 18:47:18 UTC (rev 5491)
@@ -22,13 +22,12 @@
 #
 #
 
-ap.ARCHDIR = $(ARCHI)
-# this is supposedly ignored by the stm32 makefile
-ap.ARCH = arm7tdmi
-ap.TARGET = ap
-ap.TARGETDIR = ap
 
+sim.CFLAGS += -DSITL -DAP -DFBW -DRADIO_CONTROL -DINTER_MCU -DDOWNLINK 
-DDOWNLINK_TRANSPORT=IvyTransport -DINFRARED -DLED -DWIND_INFO
+sim.srcs += latlong.c radio_control.c downlink.c commands.c gps.c inter_mcu.c 
infrared.c estimator.c sys_time.c main_fbw.c main_ap.c datalink.c 
$(SRC_ARCH)/ppm_hw.c $(SRC_ARCH)/sim_gps.c $(SRC_ARCH)/sim_ir.c 
$(SRC_ARCH)/sim_ap.c $(SRC_ARCH)/ivy_transport.c $(SRC_ARCH)/sim_adc_generic.c 
$(SRC_ARCH)/led_hw.c
 
+
+
 ap.CFLAGS += $(FIXEDWING_INC)
 ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
 ap.srcs    = $(SRC_FIXEDWING)/main.c

Modified: 
paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/navigation.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/navigation.makefile    
2010-08-19 15:39:05 UTC (rev 5490)
+++ paparazzi3/trunk/conf/autopilot/subsystems/fixedwing/navigation.makefile    
2010-08-19 18:47:18 UTC (rev 5491)
@@ -1,13 +1,11 @@
 # Standard fixed wing navigation
 
-ap.CFLAGS += -DNAV
-ap.srcs += $(SRC_FIXEDWING)/nav.c $(SRC_FIXEDWING)/fw_h_ctl.c 
$(SRC_FIXEDWING)/fw_v_ctl.c
-ap.srcs += $(SRC_FIXEDWING)/nav_survey_rectangle.c $(SRC_FIXEDWING)/nav_line.c
-ap.srcs += traffic_info.c
 
+#add these to all targets
 
+$(TARGET).CFLAGS += -DNAV
+$(TARGET).srcs += $(SRC_FIXEDWING)/nav.c $(SRC_FIXEDWING)/fw_h_ctl.c 
$(SRC_FIXEDWING)/fw_v_ctl.c
+$(TARGET).srcs += $(SRC_FIXEDWING)/traffic_info.c
+$(TARGET).srcs += $(SRC_FIXEDWING)/nav_survey_rectangle.c 
$(SRC_FIXEDWING)/nav_line.c
 
-sim.srcs += $(SRC_FIXEDWING)/nav_survey_rectangle.c $(SRC_FIXEDWING)/nav_line.c
-sim.srcs += traffic_info.c
 
-

Modified: paparazzi3/trunk/conf/boards/tiny_2.11.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/tiny_2.11.makefile     2010-08-19 15:39:05 UTC 
(rev 5490)
+++ paparazzi3/trunk/conf/boards/tiny_2.11.makefile     2010-08-19 18:47:18 UTC 
(rev 5491)
@@ -14,16 +14,11 @@
 endif
 
 
-ap.ARCHDIR = $(ARCHI)
-ap.ARCH = arm7tdmi
-ap.TARGET = autopilot
-ap.TARGETDIR = autopilot
+$(TARGET).ARCHDIR = $(ARCHI)
+$(TARGET).ARCH = arm7tdmi
+$(TARGET).TARGET = $(TARGET)
+$(TARGET).TARGETDIR = $(TARGET)
 
-fbw.ARCHDIR = $(ARCHI)
-fbw.ARCH = arm7tdmi
-fbw.TARGET = autopilot
-fbw.TARGETDIR = autopilot
-
 LPC21ISP_BAUD = 38400
 LPC21ISP_XTAL = 12000
 

Modified: paparazzi3/trunk/sw/tools/gen_aircraft.ml
===================================================================
--- paparazzi3/trunk/sw/tools/gen_aircraft.ml   2010-08-19 15:39:05 UTC (rev 
5490)
+++ paparazzi3/trunk/sw/tools/gen_aircraft.ml   2010-08-19 18:47:18 UTC (rev 
5491)
@@ -150,9 +150,9 @@
     end)
     (Xml.children xml)
 
-(** Firnware Children **)
+(** Firmware Children **)
 
-let parse_firmware = fun makefile_ac tag firmware ->
+let parse_subsystems = fun makefile_ac tag firmware ->
    match Xml.tag firmware with
     "subsystem" ->
         begin try
@@ -176,25 +176,32 @@
              (Xml.attrib firmware "type");
           fprintf makefile_ac ".makefile\n"
         with _ -> () end;
+   | _ -> ()
+
+let parse_targets = fun makefile_ac tag target ->
+   match Xml.tag target with
    | "target" ->
         begin try
-          fprintf makefile_ac "\n###########\n# -target: '%s' \n" (Xml.attrib 
firmware "name"); 
+          fprintf makefile_ac "\n###########\n# -target: '%s' \n" (Xml.attrib 
target "name"); 
+          fprintf makefile_ac "ifeq ($(TARGET), %s) \n" (Xml.attrib target 
"name"); 
          let print_if_subsystem = (fun c ->
             if ExtXml.tag_is c "param" then begin
               fprintf makefile_ac "%s = %s\n"
                 (String.uppercase(Xml.attrib c "name"))
                 (Xml.attrib c "value")
             end) in
-         List.iter print_if_subsystem (Xml.children firmware);
-(**      let print_if_subsystem = (fun c ->
-            if ExtXml.tag_is c "define" then begin
+         List.iter print_if_subsystem (Xml.children target);
+          fprintf makefile_ac "include 
$(PAPARAZZI_SRC)/conf/boards/%s.makefile\n" (Xml.attrib target "board");
+          fprintf makefile_ac "include 
$(PAPARAZZI_SRC)/conf/autopilot/%s.makefile\n" (Xml.attrib tag "name");
+         let print_if_subsystem = (fun d ->
+            if ExtXml.tag_is d "define" then begin
               fprintf makefile_ac "%s.CFLAGS += -D%s\n"
-                (String.uppercase(Xml.attrib tag "name"))
-                (Xml.attrib c "value")
+                (Xml.attrib target "name")
+                (Xml.attrib d "name")
             end) in
-         List.iter print_if_subsystem (Xml.children firmware);
-**)          fprintf makefile_ac "include 
$(PAPARAZZI_SRC)/conf/boards/%s.makefile\n" (Xml.attrib firmware "board");
-          fprintf makefile_ac "include 
$(PAPARAZZI_SRC)/conf/autopilot/%s.makefile\n" (Xml.attrib tag "name");
+         List.iter print_if_subsystem (Xml.children target);
+         List.iter (parse_subsystems makefile_ac tag) (Xml.children tag );
+          fprintf makefile_ac "endif\n\n"; 
         with _ -> () end;
    | _ -> ()
 
@@ -207,7 +214,7 @@
     if ExtXml.tag_is tag "firmware" then begin
       begin try
         fprintf makefile_ac "\n######################\n# makefile firmware 
'%s' \n" (Xml.attrib tag "name");
-       List.iter (parse_firmware makefile_ac tag) (Xml.children tag )
+       List.iter (parse_targets makefile_ac tag) (Xml.children tag )
       with _ -> () end;
     end)
     (Xml.children xml)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]