diff --git a/conf/airframes/AirborneCodeReorg/LisaFw.xml b/conf/airframes/AirborneCodeReorg/LisaFw.xml index bfcc14ec98..15baa30976 100644 --- a/conf/airframes/AirborneCodeReorg/LisaFw.xml +++ b/conf/airframes/AirborneCodeReorg/LisaFw.xml @@ -185,7 +185,7 @@ - + @@ -201,7 +201,7 @@ --> - + diff --git a/conf/airframes/mm/fixed-wing/funjetlisa.xml b/conf/airframes/mm/fixed-wing/funjetlisa.xml index d6e6556d1c..a92f5d8271 100644 --- a/conf/airframes/mm/fixed-wing/funjetlisa.xml +++ b/conf/airframes/mm/fixed-wing/funjetlisa.xml @@ -18,7 +18,7 @@ - + diff --git a/conf/airframes/mm/fixed-wing/funjetlisam.xml b/conf/airframes/mm/fixed-wing/funjetlisam.xml index 8173da67b3..33e68d8522 100644 --- a/conf/airframes/mm/fixed-wing/funjetlisam.xml +++ b/conf/airframes/mm/fixed-wing/funjetlisam.xml @@ -18,7 +18,7 @@ - + diff --git a/conf/airframes/mm/rotor/qmk1.xml b/conf/airframes/mm/rotor/qmk1.xml index 8935328ed0..81c4f76a00 100644 --- a/conf/airframes/mm/rotor/qmk1.xml +++ b/conf/airframes/mm/rotor/qmk1.xml @@ -189,7 +189,6 @@ - @@ -201,7 +200,9 @@ - + + + diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile index d4fab5b815..2e3249f679 100644 --- a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile +++ b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea4p.makefile @@ -2,9 +2,9 @@ ap.CFLAGS += -DUSE_GPS -DUBX -ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR) -ap.CFLAGS += -DUSE_UART$(GPS_UART_NR) -ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=$(GPS_BAUD) +ap.CFLAGS += -DGPS_LINK=$(GPS_PORT) +ap.CFLAGS += -DUSE_$(GPS_PORT) +ap.CFLAGS += -D$(GPS_PORT)_BAUD=$(GPS_BAUD) ifneq ($(GPS_LED),none) ap.CFLAGS += -DGPS_LED=$(GPS_LED) diff --git a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile index 27f46bc630..de753df714 100644 --- a/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile +++ b/conf/autopilot/subsystems/fixedwing/gps_ublox_lea5h.makefile @@ -2,9 +2,9 @@ ap.CFLAGS += -DUSE_GPS -DUBX -DGPS_USE_LATLONG -ap.CFLAGS += -DGPS_LINK=Uart$(GPS_UART_NR) -ap.CFLAGS += -DUSE_UART$(GPS_UART_NR) -ap.CFLAGS += -DUART$(GPS_UART_NR)_BAUD=$(GPS_BAUD) +ap.CFLAGS += -DGPS_LINK=$(GPS_PORT) +ap.CFLAGS += -DUSE_$(GPS_PORT) +ap.CFLAGS += -D$(GPS_PORT)_BAUD=$(GPS_BAUD) ifneq ($(GPS_LED),none) ap.CFLAGS += -DGPS_LED=$(GPS_LED) diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile index 8cbcfa9189..c08b83ec9e 100644 --- a/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile +++ b/conf/autopilot/subsystems/fixedwing/telemetry_transparent.makefile @@ -1,12 +1,8 @@ -ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR) -ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=$(MODEM_BAUD) +ap.CFLAGS += -DUSE_$(MODEM_PORT) +ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) -MODEM_UART = Uart$(MODEM_UART_NR) - -ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DPPRZ_UART=$(MODEM_UART) +ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_PORT) -DDOWNLINK_AP_DEVICE=$(MODEM_PORT) -DPPRZ_UART=$(MODEM_PORT) ap.CFLAGS += -DDOWNLINK_TRANSPORT=PprzTransport -DDATALINK=PPRZ ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/pprz_transport.c - - diff --git a/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile b/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile index 3fdff1608d..5dc414e00d 100644 --- a/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile +++ b/conf/autopilot/subsystems/fixedwing/telemetry_xbee_api.makefile @@ -1,10 +1,8 @@ # XBee modems in API mode -ap.CFLAGS += -DUSE_UART$(MODEM_UART_NR) -ap.CFLAGS += -DUART$(MODEM_UART_NR)_BAUD=$(MODEM_BAUD) +ap.CFLAGS += -DUSE_$(MODEM_PORT) +ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) -MODEM_UART = Uart$(MODEM_UART_NR) - -ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_UART) -DDOWNLINK_AP_DEVICE=$(MODEM_UART) -DXBEE_UART=$(MODEM_UART) +ap.CFLAGS += -DDOWNLINK -DDOWNLINK_FBW_DEVICE=$(MODEM_PORT) -DDOWNLINK_AP_DEVICE=$(MODEM_PORT) -DXBEE_UART=$(MODEM_PORT) ap.CFLAGS += -DDOWNLINK_TRANSPORT=XBeeTransport -DDATALINK=XBEE ap.srcs += $(SRC_FIXEDWING)/downlink.c $(SRC_FIRMWARE)/datalink.c $(SRC_FIXEDWING)/xbee.c diff --git a/conf/boards/classix.makefile b/conf/boards/classix.makefile index 90ae9df340..79002ad107 100644 --- a/conf/boards/classix.makefile +++ b/conf/boards/classix.makefile @@ -22,7 +22,7 @@ LPC21ISP_XTAL = 12000 ### default settings for classix -GPS_BAUD = B38400 +GPS_BAUD = B38400 GPS_LED = none # All targets on the TINY board run on the same processor achitecture diff --git a/conf/boards/hb_1.1.makefile b/conf/boards/hb_1.1.makefile index 3d20207ebd..88a5accd29 100644 --- a/conf/boards/hb_1.1.makefile +++ b/conf/boards/hb_1.1.makefile @@ -30,22 +30,12 @@ MODEM_BAUD = B57600 endif ifndef GPS_PORT -GPS_PORT=UART1 +GPS_PORT = UART1 endif ifndef GPS_BAUD -GPS_BAUD=B38400 +GPS_BAUD = B38400 endif -# -# definitions below were added to get fixedwing firmware to build -# -# modem is usualy connected there -ifndef MODEM_UART_NR -MODEM_UART_NR = 0 -endif -ifndef GPS_UART_NR -GPS_UART_NR = 1 -endif ifndef ADC_IR1 ADC_IR1 = 1 diff --git a/conf/boards/lisa_l_1.0.makefile b/conf/boards/lisa_l_1.0.makefile index 35717910a1..a78c22e03d 100644 --- a/conf/boards/lisa_l_1.0.makefile +++ b/conf/boards/lisa_l_1.0.makefile @@ -69,14 +69,6 @@ MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOD #MAX_1168_DRDY_PORT = GPIOB -# -# definitions below were added to get fixedwing firmware to build -# -# modem is usualy connected there -ifndef MODEM_UART_NR -MODEM_UART_NR = 2 -endif - ifndef ADC_IR1 ADC_IR1 = 1 ADC_IR1_CHAN = 0 diff --git a/conf/boards/lisa_m_1.0.makefile b/conf/boards/lisa_m_1.0.makefile index 89a1814674..78de8610ed 100644 --- a/conf/boards/lisa_m_1.0.makefile +++ b/conf/boards/lisa_m_1.0.makefile @@ -42,8 +42,12 @@ endif #AHRS_ALIGNER_LED = 7 +ifndef GPS_PORT GPS_PORT=UART1 +endif +ifndef GPS_BAUD GPS_BAUD=B38400 +endif GPS_LED = none # @@ -57,13 +61,6 @@ MAX_1168_DRDY_PORT_SOURCE = PortSourceGPIOD #MAX_1168_DRDY_PORT = GPIOB -# -# definitions below were added to get fixedwing firmware to build -# -# modem is usualy connected there -ifndef MODEM_UART_NR -MODEM_UART_NR = 2 -endif ifndef ADC_IR1 ADC_IR1 = 1 @@ -80,6 +77,3 @@ endif ifndef ADC_IR_NB_SAMPLES ADC_IR_NB_SAMPLES = 16 endif -ifndef GPS_UART_NR -GPS_UART_NR = 1 -endif diff --git a/conf/boards/tiny_0.99.makefile b/conf/boards/tiny_0.99.makefile index 22e454ffcd..1b077c6b40 100644 --- a/conf/boards/tiny_0.99.makefile +++ b/conf/boards/tiny_0.99.makefile @@ -13,6 +13,6 @@ BOARD_VERSION=0.99 BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" -GPS_UART_NR = 1 +GPS_PORT = UART1 GPS_LED = none -MODEM_UART_NR = 0 +MODEM_PORT = UART0 diff --git a/conf/boards/tiny_1.1.makefile b/conf/boards/tiny_1.1.makefile index 538b7b186f..7250804216 100644 --- a/conf/boards/tiny_1.1.makefile +++ b/conf/boards/tiny_1.1.makefile @@ -13,6 +13,6 @@ BOARD_VERSION=1.1 BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" -GPS_UART_NR = 1 +GPS_PORT = UART1 GPS_LED = none -MODEM_UART_NR = 0 +MODEM_PORT = UART0 diff --git a/conf/boards/tiny_2.11.makefile b/conf/boards/tiny_2.11.makefile index 9faf7301a9..392eb13482 100644 --- a/conf/boards/tiny_2.11.makefile +++ b/conf/boards/tiny_2.11.makefile @@ -21,11 +21,20 @@ LPC21ISP_XTAL = 12000 ### default settings for tiny_2 and twog -GPS_UART_NR = 0 +ifndef GPS_PORT +GPS_PORT = UART0 +endif +ifndef GPS_BAUD GPS_BAUD = B38400 +endif GPS_LED = 2 -MODEM_UART_NR = 1 + +ifndef MODEM_PORT +MODEM_PORT = UART1 +endif +ifndef MODEM_BAUD MODEM_BAUD = B57600 +endif ADC_IR_TOP = ADC_0 ADC_IR1 = ADC_1 diff --git a/sw/airborne/Makefile b/sw/airborne/Makefile index adb2189087..f969cc7499 100644 --- a/sw/airborne/Makefile +++ b/sw/airborne/Makefile @@ -42,6 +42,14 @@ ifneq ($(MAKECMDGOALS),clean) endif endif +# check for obsolete MODEM_UART_NR and GPS_UART_NR makefile vars +ifdef GPS_UART_NR + $(error GPS_UART_NR is obsolete, please use GPS_PORT instead to define the Uart to use, e.g. ) +endif +ifdef MODEM_UART_NR + $(error MODEM_UART_NR is obsolete, please use MODEM_PORT instead to define the Uart to use, e.g. ) +endif + $(TARGET).install : warn_conf warn_conf :