mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-484 Set correct servo out bank mode (PWM). Enable TIM1_UP_IRQ to fix PPM input @main port for oplinkmini target. Move ComUsbBridge to OPTMODULES for oplinkmini target.
This commit is contained in:
parent
45d1eb7493
commit
d49394f8fb
@ -110,16 +110,16 @@ static int32_t comUsbBridgeInitialize(void)
|
|||||||
usart_port);
|
usart_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
// #ifdef MODULE_COMUSBBRIDGE_BUILTIN
|
#ifdef MODULE_COMUSBBRIDGE_BUILTIN
|
||||||
// bridge_enabled = true;
|
bridge_enabled = true;
|
||||||
// #else
|
#else
|
||||||
//
|
|
||||||
if (usart_port && vcp_port) {
|
if (usart_port && vcp_port) {
|
||||||
bridge_enabled = true;
|
bridge_enabled = true;
|
||||||
} else {
|
} else {
|
||||||
bridge_enabled = false;
|
bridge_enabled = false;
|
||||||
}
|
}
|
||||||
// #endif
|
#endif
|
||||||
|
|
||||||
if (bridge_enabled) {
|
if (bridge_enabled) {
|
||||||
com2usb_buf = pios_malloc(BRIDGE_BUF_LEN);
|
com2usb_buf = pios_malloc(BRIDGE_BUF_LEN);
|
||||||
|
@ -103,6 +103,13 @@ int32_t PIOS_TIM_InitClock(const struct pios_tim_clock_cfg *cfg)
|
|||||||
/* Enable Interrupts */
|
/* Enable Interrupts */
|
||||||
NVIC_Init(&cfg->irq.init);
|
NVIC_Init(&cfg->irq.init);
|
||||||
|
|
||||||
|
/* Advanced TIM1 has additional IRQ */
|
||||||
|
if (cfg->timer == TIM1) {
|
||||||
|
NVIC_InitTypeDef init = cfg->irq.init;
|
||||||
|
init.NVIC_IRQChannel = TIM1_UP_IRQn;
|
||||||
|
NVIC_Init(&init);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,10 +29,9 @@ override USE_DSP_LIB := NO
|
|||||||
|
|
||||||
# List of mandatory modules to include
|
# List of mandatory modules to include
|
||||||
MODULES += RadioComBridge
|
MODULES += RadioComBridge
|
||||||
MODULES += ComUsbBridge
|
|
||||||
|
|
||||||
# List of optional modules to include
|
# List of optional modules to include
|
||||||
OPTMODULES =
|
OPTMODULES = ComUsbBridge
|
||||||
|
|
||||||
# List C source files here (C dependencies are automatically generated).
|
# List C source files here (C dependencies are automatically generated).
|
||||||
# Use file-extension c for "c-only"-files
|
# Use file-extension c for "c-only"-files
|
||||||
|
@ -384,6 +384,11 @@ void PIOS_Board_Init(void)
|
|||||||
servo_count = 2;
|
servo_count = 2;
|
||||||
PIOS_Servo_Init(&pios_servo_flexi_cfg);
|
PIOS_Servo_Init(&pios_servo_flexi_cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set bank modes
|
||||||
|
|
||||||
|
PIOS_Servo_SetBankMode(0, PIOS_SERVO_BANK_MODE_PWM);
|
||||||
|
PIOS_Servo_SetBankMode(1, PIOS_SERVO_BANK_MODE_PWM);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Initialize out status object.
|
// Initialize out status object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user