mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge branch 'mainboard_receiver_fix' into next
This commit is contained in:
commit
aad41ebb4f
@ -969,7 +969,6 @@ void PIOS_Board_Init(void) {
|
||||
UAVObjInitialize();
|
||||
|
||||
HwSettingsInitialize();
|
||||
ManualControlSettingsInitialize();
|
||||
|
||||
#if defined(PIOS_INCLUDE_RTC)
|
||||
/* Initialize the real-time clock and its associated tick */
|
||||
@ -1164,12 +1163,12 @@ void PIOS_Board_Init(void) {
|
||||
|
||||
/* Configure the rcvr port */
|
||||
uint8_t hwsettings_rcvrport;
|
||||
HwSettingsRcvrPortGet(&hwsettings_rcvrport);
|
||||
HwSettingsCC_RcvrPortGet(&hwsettings_rcvrport);
|
||||
|
||||
switch (hwsettings_rcvrport) {
|
||||
case HWSETTINGS_RCVRPORT_DISABLED:
|
||||
case HWSETTINGS_CC_RCVRPORT_DISABLED:
|
||||
break;
|
||||
case HWSETTINGS_RCVRPORT_PWM:
|
||||
case HWSETTINGS_CC_RCVRPORT_PWM:
|
||||
#if defined(PIOS_INCLUDE_PWM)
|
||||
{
|
||||
uint32_t pios_pwm_id;
|
||||
@ -1183,7 +1182,7 @@ void PIOS_Board_Init(void) {
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_PWM */
|
||||
break;
|
||||
case HWSETTINGS_RCVRPORT_PPM:
|
||||
case HWSETTINGS_CC_RCVRPORT_PPM:
|
||||
#if defined(PIOS_INCLUDE_PPM)
|
||||
{
|
||||
uint32_t pios_ppm_id;
|
||||
|
@ -736,7 +736,7 @@ const struct pios_servo_cfg pios_servo_cfg = {
|
||||
/*
|
||||
* PWM Inputs
|
||||
*/
|
||||
#if defined(PIOS_INCLUDE_PWM)
|
||||
#if defined(PIOS_INCLUDE_PWM) || defined(PIOS_INCLUDE_PPM)
|
||||
#include <pios_pwm_priv.h>
|
||||
static const struct pios_tim_channel pios_tim_rcvrport_all_channels[] = {
|
||||
{
|
||||
@ -1099,6 +1099,8 @@ void PIOS_Board_Init(void) {
|
||||
EventDispatcherInitialize();
|
||||
UAVObjInitialize();
|
||||
|
||||
HwSettingsInitialize();
|
||||
|
||||
#if defined(PIOS_INCLUDE_RTC)
|
||||
/* Initialize the real-time clock and its associated tick */
|
||||
PIOS_RTC_Init(&pios_rtc_main_cfg);
|
||||
@ -1191,17 +1193,18 @@ void PIOS_Board_Init(void) {
|
||||
PIOS_ADC_Init();
|
||||
PIOS_GPIO_Init();
|
||||
|
||||
/* Configure the aux port */
|
||||
uint8_t hwsettings_op_auxport;
|
||||
HwSettingsOP_AuxPortGet(&hwsettings_op_auxport);
|
||||
/* Configure the rcvr port */
|
||||
uint8_t hwsettings_rcvrport;
|
||||
HwSettingsOP_RcvrPortGet(&hwsettings_rcvrport);
|
||||
|
||||
switch (hwsettings_op_auxport) {
|
||||
case HWSETTINGS_OP_AUXPORT_DISABLED:
|
||||
|
||||
switch (hwsettings_rcvrport) {
|
||||
case HWSETTINGS_OP_RCVRPORT_DISABLED:
|
||||
break;
|
||||
case HWSETTINGS_OP_AUXPORT_DEBUG:
|
||||
case HWSETTINGS_OP_RCVRPORT_DEBUG:
|
||||
/* Not supported yet */
|
||||
break;
|
||||
case HWSETTINGS_OP_AUXPORT_SPEKTRUM1:
|
||||
case HWSETTINGS_OP_RCVRPORT_SPEKTRUM1:
|
||||
#if defined(PIOS_INCLUDE_SPEKTRUM)
|
||||
{
|
||||
uint32_t pios_usart_spektrum_id;
|
||||
@ -1222,16 +1225,7 @@ void PIOS_Board_Init(void) {
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
/* Configure the rcvr port */
|
||||
uint8_t hwsettings_rcvrport;
|
||||
HwSettingsRcvrPortGet(&hwsettings_rcvrport);
|
||||
|
||||
switch (hwsettings_rcvrport) {
|
||||
case HWSETTINGS_RCVRPORT_DISABLED:
|
||||
break;
|
||||
case HWSETTINGS_RCVRPORT_PWM:
|
||||
case HWSETTINGS_OP_RCVRPORT_PWM:
|
||||
#if defined(PIOS_INCLUDE_PWM)
|
||||
{
|
||||
uint32_t pios_pwm_id;
|
||||
@ -1245,7 +1239,7 @@ void PIOS_Board_Init(void) {
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_PWM */
|
||||
break;
|
||||
case HWSETTINGS_RCVRPORT_PPM:
|
||||
case HWSETTINGS_OP_RCVRPORT_PPM:
|
||||
#if defined(PIOS_INCLUDE_PPM)
|
||||
{
|
||||
uint32_t pios_ppm_id;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* This is the size of the stack for early init and for all FreeRTOS IRQs */
|
||||
_irq_stack_size = 0x400;
|
||||
_irq_stack_size = 0x800;
|
||||
/* This is the size of the stack for early init: life span is until scheduler starts */
|
||||
_init_stack_size = 0x400;
|
||||
_init_stack_size = 0x800;
|
||||
|
||||
/* Check valid alignment for VTOR */
|
||||
ASSERT(ORIGIN(FLASH) == ALIGN(ORIGIN(FLASH), 0x80), "Start of memory region flash not aligned for startup vector table");
|
||||
|
@ -365,17 +365,23 @@ static void PIOS_TIM_generic_irq_handler(TIM_TypeDef * timer)
|
||||
* Map all valid TIM IRQs to the common interrupt handler
|
||||
* and give it enough context to properly demux the various timers
|
||||
*/
|
||||
static void PIOS_TIM_1_irq_handler (void)
|
||||
void TIM1_UP_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_1_UP_irq_handler")));
|
||||
static void PIOS_TIM_1_UP_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM1);
|
||||
}
|
||||
void TIM1_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_1_irq_handler")));
|
||||
|
||||
void TIM1_CC_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_1_CC_irq_handler")));
|
||||
static void PIOS_TIM_1_CC_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM1);
|
||||
}
|
||||
|
||||
void TIM2_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_2_irq_handler")));
|
||||
static void PIOS_TIM_2_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM2);
|
||||
}
|
||||
void TIM2_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_2_irq_handler")));
|
||||
|
||||
void TIM3_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_3_irq_handler")));
|
||||
static void PIOS_TIM_3_irq_handler (void)
|
||||
@ -389,3 +395,33 @@ static void PIOS_TIM_4_irq_handler (void)
|
||||
PIOS_TIM_generic_irq_handler (TIM4);
|
||||
}
|
||||
|
||||
void TIM5_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_5_irq_handler")));
|
||||
static void PIOS_TIM_5_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM5);
|
||||
}
|
||||
|
||||
void TIM6_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_6_irq_handler")));
|
||||
static void PIOS_TIM_6_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM6);
|
||||
}
|
||||
|
||||
void TIM7_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_7_irq_handler")));
|
||||
static void PIOS_TIM_7_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM7);
|
||||
}
|
||||
|
||||
void TIM8_UP_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_8_UP_irq_handler")));
|
||||
static void PIOS_TIM_8_UP_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM8);
|
||||
}
|
||||
|
||||
void TIM8_CC_IRQHandler(void) __attribute__ ((alias ("PIOS_TIM_8_CC_irq_handler")));
|
||||
static void PIOS_TIM_8_CC_irq_handler (void)
|
||||
{
|
||||
PIOS_TIM_generic_irq_handler (TIM8);
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,8 @@
|
||||
65643CB01413322000A32F59 /* pios_spektrum_priv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pios_spektrum_priv.h; sourceTree = "<group>"; };
|
||||
65643CB91413456D00A32F59 /* pios_tim.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_tim.c; sourceTree = "<group>"; };
|
||||
65643CBA141350C200A32F59 /* pios_sbus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pios_sbus.c; sourceTree = "<group>"; };
|
||||
65643CEC141429A100A32F59 /* NMEA.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = NMEA.c; sourceTree = "<group>"; };
|
||||
65643CEE141429AF00A32F59 /* NMEA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NMEA.h; sourceTree = "<group>"; };
|
||||
6572CB1613D0F2B200FC2972 /* link_STM32103CB_CC_Rev1_memory.ld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = link_STM32103CB_CC_Rev1_memory.ld; path = ../../PiOS/STM32F10x/link_STM32103CB_CC_Rev1_memory.ld; sourceTree = SOURCE_ROOT; };
|
||||
6572CB1713D0F2B200FC2972 /* link_STM32103CB_CC_Rev1_sections.ld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = link_STM32103CB_CC_Rev1_sections.ld; path = ../../PiOS/STM32F10x/link_STM32103CB_CC_Rev1_sections.ld; sourceTree = SOURCE_ROOT; };
|
||||
657CEEAD121DB6C8007A1FBE /* homelocation.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = homelocation.xml; sourceTree = "<group>"; };
|
||||
@ -7766,6 +7768,24 @@
|
||||
65E8F05811EFF25C00BBF654 /* STM32F10x */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
65D1FBD813F51865006374A6 /* pios_bmp085.c */,
|
||||
6560A39D13EE277E00105DA5 /* pios_iap.c */,
|
||||
6560A39E13EE277E00105DA5 /* pios_sbus.c */,
|
||||
6560A38E13EE270C00105DA5 /* link_STM3210E_INS_BL_sections.ld */,
|
||||
6560A38F13EE270C00105DA5 /* link_STM3210E_INS_memory.ld */,
|
||||
6560A39013EE270C00105DA5 /* link_STM3210E_INS_sections.ld */,
|
||||
6560A39113EE270C00105DA5 /* link_STM3210E_OP_BL_sections.ld */,
|
||||
6560A39213EE270C00105DA5 /* link_STM3210E_OP_memory.ld */,
|
||||
6560A39313EE270C00105DA5 /* link_STM3210E_OP_sections.ld */,
|
||||
6560A39413EE270C00105DA5 /* link_STM32103CB_AHRS_BL_sections.ld */,
|
||||
6560A39513EE270C00105DA5 /* link_STM32103CB_AHRS_memory.ld */,
|
||||
6560A39613EE270C00105DA5 /* link_STM32103CB_AHRS_sections.ld */,
|
||||
6560A39713EE270C00105DA5 /* link_STM32103CB_CC_Rev1_BL_sections.ld */,
|
||||
6572CB1613D0F2B200FC2972 /* link_STM32103CB_CC_Rev1_memory.ld */,
|
||||
6572CB1713D0F2B200FC2972 /* link_STM32103CB_CC_Rev1_sections.ld */,
|
||||
6560A39813EE270C00105DA5 /* link_STM32103CB_PIPXTREME_BL_sections.ld */,
|
||||
6560A39913EE270C00105DA5 /* link_STM32103CB_PIPXTREME_memory.ld */,
|
||||
6560A39A13EE270C00105DA5 /* link_STM32103CB_PIPXTREME_sections.ld */,
|
||||
65E8F05911EFF25C00BBF654 /* Libraries */,
|
||||
65E8F0D811EFF25C00BBF654 /* link_stm32f10x_HD.ld */,
|
||||
65E8F0DB11EFF25C00BBF654 /* link_stm32f10x_MD.ld */,
|
||||
@ -7803,8 +7823,6 @@
|
||||
65E8F05911EFF25C00BBF654 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6572CB1613D0F2B200FC2972 /* link_STM32103CB_CC_Rev1_memory.ld */,
|
||||
6572CB1713D0F2B200FC2972 /* link_STM32103CB_CC_Rev1_sections.ld */,
|
||||
65E8F05A11EFF25C00BBF654 /* CMSIS */,
|
||||
65E8F06B11EFF25C00BBF654 /* dosfs */,
|
||||
65E8F07111EFF25C00BBF654 /* FreeRTOS */,
|
||||
|
@ -43,7 +43,7 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
addUAVObjectToWidgetRelation("TelemetrySettings","Speed",m_telemetry->telemetrySpeed);
|
||||
addUAVObjectToWidgetRelation("HwSettings","CC_FlexiPort",m_telemetry->cbFlexi);
|
||||
addUAVObjectToWidgetRelation("HwSettings","CC_MainPort",m_telemetry->cbTele);
|
||||
addUAVObjectToWidgetRelation("HwSettings","RcvrPort",m_telemetry->cbRcvr);
|
||||
addUAVObjectToWidgetRelation("HwSettings","CC_RcvrPort",m_telemetry->cbRcvr);
|
||||
connect(m_telemetry->cchwHelp,SIGNAL(clicked()),this,SLOT(openHelp()));
|
||||
enableControls(false);
|
||||
populateWidgets();
|
||||
|
@ -3,12 +3,11 @@
|
||||
<description>Selection of optional hardware configurations.</description>
|
||||
<field name="CC_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,Spektrum1,Spektrum2,ComAux,I2C" defaultvalue="Disabled"/>
|
||||
<field name="CC_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,S.Bus,GPS,Spektrum1,Spektrum2,ComAux" defaultvalue="Telemetry"/>
|
||||
<field name="CC_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM" defaultvalue="PWM"/>
|
||||
|
||||
<field name="OP_FlexiPort" units="function" type="enum" elements="1" options="Disabled,GPS" defaultvalue="GPS"/>
|
||||
<field name="OP_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry" defaultvalue="Telemetry"/>
|
||||
<field name="OP_AuxPort" units="function" type="enum" elements="1" options="Disabled,Debug,Spektrum1" defaultvalue="Disabled"/>
|
||||
|
||||
<field name="RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM" defaultvalue="PWM"/>
|
||||
<field name="OP_RcvrPort" units="function" type="enum" elements="1" options="Disabled,Debug,Spektrum1,PWM,PPM" defaultvalue="PWM"/>
|
||||
|
||||
<field name="OptionalModules" units="" type="enum" elementnames="CameraStabilization,GPS" options="Disabled,Enabled" defaultvalue="Disabled"/>
|
||||
<field name="DSMxBind" units="" type="uint8" elements="1" defaultvalue="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user