mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Normalized the HW configuration to point to _RM_ configuration settins
This commit is contained in:
parent
920c2682d2
commit
774dde3da5
@ -519,14 +519,14 @@ void PIOS_Board_Init(void) {
|
|||||||
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT,&hwsettings_DSMxBind);
|
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT,&hwsettings_DSMxBind);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_CC_MAINPORT_DEBUGCONSOLE:
|
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
{
|
{
|
||||||
PIOS_Board_configure_com(&pios_usart_main_cfg, 0, PIOS_COM_DEBUGCONSOLE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
PIOS_Board_configure_com(&pios_usart_main_cfg, 0, PIOS_COM_DEBUGCONSOLE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_CC_MAINPORT_COMBRIDGE:
|
case HWSETTINGS_RM_MAINPORT_COMBRIDGE:
|
||||||
PIOS_Board_configure_com(&pios_usart_main_cfg, PIOS_COM_BRIDGE_RX_BUF_LEN, PIOS_COM_BRIDGE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_bridge_id);
|
PIOS_Board_configure_com(&pios_usart_main_cfg, PIOS_COM_BRIDGE_RX_BUF_LEN, PIOS_COM_BRIDGE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_bridge_id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -597,12 +597,12 @@ void PIOS_Board_Init(void) {
|
|||||||
|
|
||||||
/* Configure the receiver port*/
|
/* Configure the receiver port*/
|
||||||
uint8_t hwsettings_rcvrport;
|
uint8_t hwsettings_rcvrport;
|
||||||
HwSettingsRV_RcvrPortGet(&hwsettings_rcvrport);
|
HwSettingsRM_RcvrPortGet(&hwsettings_rcvrport);
|
||||||
//
|
//
|
||||||
switch (hwsettings_rcvrport){
|
switch (hwsettings_rcvrport){
|
||||||
case HWSETTINGS_RV_RCVRPORT_DISABLED:
|
case HWSETTINGS_RM_RCVRPORT_DISABLED:
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_RV_RCVRPORT_PWM:
|
case HWSETTINGS_RM_RCVRPORT_PWM:
|
||||||
#if defined(PIOS_INCLUDE_PWM)
|
#if defined(PIOS_INCLUDE_PWM)
|
||||||
{
|
{
|
||||||
/* Set up the receiver port. Later this should be optional */
|
/* Set up the receiver port. Later this should be optional */
|
||||||
@ -617,8 +617,8 @@ void PIOS_Board_Init(void) {
|
|||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_PWM */
|
#endif /* PIOS_INCLUDE_PWM */
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_RV_RCVRPORT_PPM:
|
case HWSETTINGS_RM_RCVRPORT_PPM:
|
||||||
case HWSETTINGS_RV_RCVRPORT_PPMOUTPUTS:
|
case HWSETTINGS_RM_RCVRPORT_PPMOUTPUTS:
|
||||||
#if defined(PIOS_INCLUDE_PPM)
|
#if defined(PIOS_INCLUDE_PPM)
|
||||||
{
|
{
|
||||||
uint32_t pios_ppm_id;
|
uint32_t pios_ppm_id;
|
||||||
@ -631,7 +631,7 @@ void PIOS_Board_Init(void) {
|
|||||||
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_PPM] = pios_ppm_rcvr_id;
|
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_PPM] = pios_ppm_rcvr_id;
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_PPM */
|
#endif /* PIOS_INCLUDE_PPM */
|
||||||
case HWSETTINGS_RV_RCVRPORT_OUTPUTS:
|
case HWSETTINGS_RM_RCVRPORT_OUTPUTS:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -650,14 +650,14 @@ void PIOS_Board_Init(void) {
|
|||||||
|
|
||||||
#ifndef PIOS_DEBUG_ENABLE_DEBUG_PINS
|
#ifndef PIOS_DEBUG_ENABLE_DEBUG_PINS
|
||||||
switch (hwsettings_rcvrport) {
|
switch (hwsettings_rcvrport) {
|
||||||
case HWSETTINGS_RV_RCVRPORT_DISABLED:
|
case HWSETTINGS_RM_RCVRPORT_DISABLED:
|
||||||
case HWSETTINGS_RV_RCVRPORT_PWM:
|
case HWSETTINGS_RM_RCVRPORT_PWM:
|
||||||
case HWSETTINGS_RV_RCVRPORT_PPM:
|
case HWSETTINGS_RM_RCVRPORT_PPM:
|
||||||
/* Set up the servo outputs */
|
/* Set up the servo outputs */
|
||||||
PIOS_Servo_Init(&pios_servo_cfg);
|
PIOS_Servo_Init(&pios_servo_cfg);
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_RV_RCVRPORT_PPMOUTPUTS:
|
case HWSETTINGS_RM_RCVRPORT_PPMOUTPUTS:
|
||||||
case HWSETTINGS_RV_RCVRPORT_OUTPUTS:
|
case HWSETTINGS_RM_RCVRPORT_OUTPUTS:
|
||||||
//PIOS_Servo_Init(&pios_servo_rcvr_cfg);
|
//PIOS_Servo_Init(&pios_servo_rcvr_cfg);
|
||||||
//TODO: Prepare the configurations on board_hw_defs and handle here:
|
//TODO: Prepare the configurations on board_hw_defs and handle here:
|
||||||
PIOS_Servo_Init(&pios_servo_cfg);
|
PIOS_Servo_Init(&pios_servo_cfg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user