mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Merge branch 'next' into thread/OP-39
This commit is contained in:
commit
ccf070a897
2
Makefile
2
Makefile
@ -158,7 +158,7 @@ $(BUILD_DIR):
|
||||
###############################################################
|
||||
|
||||
# Set up QT toolchain
|
||||
QT_SDK_DIR := $(TOOLS_DIR)/qtsdk-v1.2
|
||||
QT_SDK_DIR := $(TOOLS_DIR)/qtsdk-v1.2.1
|
||||
|
||||
.PHONY: qt_sdk_install
|
||||
qt_sdk_install: QT_SDK_URL := http://www.developer.nokia.com/dp?uri=http://sw.nokia.com/id/8ea74da4-fec1-4277-8b26-c58cc82e204b/Qt_SDK_Lin32_offline
|
||||
|
@ -93,6 +93,9 @@ void PIOS_LED_On(uint32_t led_id)
|
||||
|
||||
const struct pios_led * led = &(led_cfg->leds[led_id]);
|
||||
|
||||
if (led->active_high)
|
||||
GPIO_SetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
else
|
||||
GPIO_ResetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
}
|
||||
|
||||
@ -111,6 +114,9 @@ void PIOS_LED_Off(uint32_t led_id)
|
||||
|
||||
const struct pios_led * led = &(led_cfg->leds[led_id]);
|
||||
|
||||
if (led->active_high)
|
||||
GPIO_ResetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
else
|
||||
GPIO_SetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
}
|
||||
|
||||
@ -130,8 +136,14 @@ void PIOS_LED_Toggle(uint32_t led_id)
|
||||
const struct pios_led * led = &(led_cfg->leds[led_id]);
|
||||
|
||||
if (GPIO_ReadOutputDataBit(led->pin.gpio, led->pin.init.GPIO_Pin) == Bit_SET) {
|
||||
if (led->active_high)
|
||||
PIOS_LED_Off(led_id);
|
||||
else
|
||||
PIOS_LED_On(led_id);
|
||||
} else {
|
||||
if (led->active_high)
|
||||
PIOS_LED_On(led_id);
|
||||
else
|
||||
PIOS_LED_Off(led_id);
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,9 @@ void PIOS_LED_On(uint32_t led_id)
|
||||
|
||||
const struct pios_led * led = &(led_cfg->leds[led_id]);
|
||||
|
||||
if (led->active_high)
|
||||
GPIO_SetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
else
|
||||
GPIO_ResetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
}
|
||||
|
||||
@ -95,6 +98,9 @@ void PIOS_LED_Off(uint32_t led_id)
|
||||
|
||||
const struct pios_led * led = &(led_cfg->leds[led_id]);
|
||||
|
||||
if (led->active_high)
|
||||
GPIO_ResetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
else
|
||||
GPIO_SetBits(led->pin.gpio, led->pin.init.GPIO_Pin);
|
||||
}
|
||||
|
||||
@ -114,8 +120,14 @@ void PIOS_LED_Toggle(uint32_t led_id)
|
||||
const struct pios_led * led = &(led_cfg->leds[led_id]);
|
||||
|
||||
if (GPIO_ReadOutputDataBit(led->pin.gpio, led->pin.init.GPIO_Pin) == Bit_SET) {
|
||||
if (led->active_high)
|
||||
PIOS_LED_Off(led_id);
|
||||
else
|
||||
PIOS_LED_On(led_id);
|
||||
} else {
|
||||
if (led->active_high)
|
||||
PIOS_LED_On(led_id);
|
||||
else
|
||||
PIOS_LED_Off(led_id);
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
struct pios_led {
|
||||
struct stm32_gpio pin;
|
||||
uint32_t remap;
|
||||
bool active_high;
|
||||
};
|
||||
|
||||
struct pios_led_cfg {
|
||||
|
@ -71,6 +71,8 @@ PIOSINC = $(PIOS)/inc
|
||||
OPMODULEDIR = ../Modules
|
||||
FLIGHTLIB = ../Libraries
|
||||
FLIGHTLIBINC = ../Libraries/inc
|
||||
MATHLIB = ../Libraries/math
|
||||
MATHLIBINC = ../Libraries/math
|
||||
PIOSPOSIX = $(PIOS)/posix
|
||||
PIOSCOMMON = $(PIOS)/posix
|
||||
PIOSBOARDS = $(PIOS)/Boards
|
||||
@ -132,6 +134,9 @@ SRC += $(FLIGHTLIB)/WorldMagModel.c
|
||||
SRC += $(FLIGHTLIB)/insgps13state.c
|
||||
SRC += $(FLIGHTLIB)/taskmonitor.c
|
||||
|
||||
SRC += $(MATHLIB)/sin_lookup.c
|
||||
SRC += $(MATHLIB)/pid.c
|
||||
|
||||
## PIOS Hardware (STM32F4xx)
|
||||
include $(PIOS)/posix/library.mk
|
||||
|
||||
@ -190,6 +195,7 @@ EXTRAINCDIRS += $(OPUAVOBJ)
|
||||
EXTRAINCDIRS += $(OPUAVOBJINC)
|
||||
EXTRAINCDIRS += $(UAVOBJSYNTHDIR)
|
||||
EXTRAINCDIRS += $(FLIGHTLIBINC)
|
||||
EXTRAINCDIRS += $(MATHLIBINC)
|
||||
#EXTRAINCDIRS += $(PIOSSTM32F4XX)
|
||||
EXTRAINCDIRS += $(PIOSCOMMON)
|
||||
EXTRAINCDIRS += $(PIOSBOARDS)
|
||||
|
@ -63,6 +63,8 @@ UAVOBJSRCFILENAMES += positionactual
|
||||
UAVOBJSRCFILENAMES += positiondesired
|
||||
UAVOBJSRCFILENAMES += ratedesired
|
||||
UAVOBJSRCFILENAMES += revocalibration
|
||||
UAVOBJSRCFILENAMES += relaytuning
|
||||
UAVOBJSRCFILENAMES += relaytuningsettings
|
||||
UAVOBJSRCFILENAMES += sonaraltitude
|
||||
UAVOBJSRCFILENAMES += stabilizationdesired
|
||||
UAVOBJSRCFILENAMES += stabilizationsettings
|
||||
|
Loading…
Reference in New Issue
Block a user