Skip to content

Commit

Permalink
added FIRMWARE defines
Browse files Browse the repository at this point in the history
gps_ubx_ucenter module uses it to get full NAV_SOL message rate for rotorcrafts
closes #225
  • Loading branch information
flixr committed Jun 30, 2012
1 parent 46a14c1 commit a89d941
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conf/firmwares/rotorcraft.makefile
Expand Up @@ -40,6 +40,8 @@ ROTORCRAFT_INC = -I$(SRC_FIRMWARE) -I$(SRC_BOARD)

ap.ARCHDIR = $(ARCH)

# would be better to auto-generate this
$(TARGET).CFLAGS += -DFIRMWARE=ROTORCRAFT

ap.CFLAGS += $(ROTORCRAFT_INC)
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -DPERIPHERALS_AUTO_INIT
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/fixedwing/autopilot.makefile
Expand Up @@ -39,6 +39,9 @@ $(TARGET).CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
$(TARGET).CFLAGS += -DPERIPHERALS_AUTO_INIT
$(TARGET).CFLAGS += $(FIXEDWING_INC)

# would be better to auto-generate this
$(TARGET).CFLAGS += -DFIRMWARE=FIXEDWING

$(TARGET).srcs += mcu.c
$(TARGET).srcs += $(SRC_ARCH)/mcu_arch.c

Expand Down
4 changes: 4 additions & 0 deletions sw/airborne/modules/gps/gps_ubx_ucenter.c
Expand Up @@ -379,7 +379,11 @@ static bool_t gps_ubx_ucenter_configure(uint8_t nr)
gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SVINFO_ID, 4);
break;
case 11:
#if defined FIRMWARE && FIRMWARE == ROTORCRAFT
gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 1);
#else
gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 8);
#endif
break;
case 12:
// Disable UTM on old Lea4P
Expand Down

0 comments on commit a89d941

Please sign in to comment.