mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
LP-104 Cleaned up configuration. Only Allow HoTT on flexi port.
This commit is contained in:
parent
359266ab7a
commit
6a3a822c87
@ -658,8 +658,8 @@ static bool updateRcvrActivityCompare(uint32_t rcvr_id, struct rcvr_activity_fsm
|
|||||||
case MANUALCONTROLSETTINGS_CHANNELGROUPS_SBUS:
|
case MANUALCONTROLSETTINGS_CHANNELGROUPS_SBUS:
|
||||||
group = RECEIVERACTIVITY_ACTIVEGROUP_SBUS;
|
group = RECEIVERACTIVITY_ACTIVEGROUP_SBUS;
|
||||||
break;
|
break;
|
||||||
case MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTTFLEXIPORT:
|
case MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTT:
|
||||||
group = RECEIVERACTIVITY_ACTIVEGROUP_HOTTFLEXIPORT;
|
group = RECEIVERACTIVITY_ACTIVEGROUP_HOTT;
|
||||||
break;
|
break;
|
||||||
case MANUALCONTROLSETTINGS_CHANNELGROUPS_SRXL:
|
case MANUALCONTROLSETTINGS_CHANNELGROUPS_SRXL:
|
||||||
group = RECEIVERACTIVITY_ACTIVEGROUP_SRXL;
|
group = RECEIVERACTIVITY_ACTIVEGROUP_SRXL;
|
||||||
|
@ -694,7 +694,7 @@ void PIOS_Board_Init(void)
|
|||||||
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTTFLEXIPORT] = pios_hott_rcvr_id;
|
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTT] = pios_hott_rcvr_id;
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_HOTT */
|
#endif /* PIOS_INCLUDE_HOTT */
|
||||||
break;
|
break;
|
||||||
|
@ -1102,47 +1102,6 @@ static const struct pios_usart_cfg pios_usart_hott_flexi_cfg = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct pios_usart_cfg pios_usart_hott_main_cfg = {
|
|
||||||
.regs = USART1,
|
|
||||||
.remap = GPIO_AF_USART1,
|
|
||||||
.init = {
|
|
||||||
.USART_BaudRate = 115200,
|
|
||||||
.USART_WordLength = USART_WordLength_8b,
|
|
||||||
.USART_Parity = USART_Parity_No,
|
|
||||||
.USART_StopBits = USART_StopBits_1,
|
|
||||||
.USART_HardwareFlowControl = USART_HardwareFlowControl_None,
|
|
||||||
.USART_Mode = USART_Mode_Rx,
|
|
||||||
},
|
|
||||||
.irq = {
|
|
||||||
.init = {
|
|
||||||
.NVIC_IRQChannel = USART1_IRQn,
|
|
||||||
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_HIGH,
|
|
||||||
.NVIC_IRQChannelSubPriority = 0,
|
|
||||||
.NVIC_IRQChannelCmd = ENABLE,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
.rx = {
|
|
||||||
.gpio = GPIOA,
|
|
||||||
.init = {
|
|
||||||
.GPIO_Pin = GPIO_Pin_10,
|
|
||||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
|
||||||
.GPIO_Mode = GPIO_Mode_AF,
|
|
||||||
.GPIO_OType = GPIO_OType_PP,
|
|
||||||
.GPIO_PuPd = GPIO_PuPd_UP
|
|
||||||
},
|
|
||||||
},
|
|
||||||
.tx = {
|
|
||||||
.gpio = GPIOA,
|
|
||||||
.init = {
|
|
||||||
.GPIO_Pin = GPIO_Pin_9,
|
|
||||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
|
||||||
.GPIO_Mode = GPIO_Mode_AF,
|
|
||||||
.GPIO_OType = GPIO_OType_PP,
|
|
||||||
.GPIO_PuPd = GPIO_PuPd_UP
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* PIOS_INCLUDE_HOTT */
|
#endif /* PIOS_INCLUDE_HOTT */
|
||||||
/*
|
/*
|
||||||
* HK OSD
|
* HK OSD
|
||||||
|
@ -540,7 +540,7 @@ void PIOS_Board_Init(void)
|
|||||||
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTTFLEXIPORT] = pios_hott_rcvr_id;
|
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTT] = pios_hott_rcvr_id;
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_HOTT */
|
#endif /* PIOS_INCLUDE_HOTT */
|
||||||
break;
|
break;
|
||||||
@ -729,30 +729,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_Board_configure_dsm(&pios_usart_dsm_main_cfg, &pios_dsm_main_cfg,
|
PIOS_Board_configure_dsm(&pios_usart_dsm_main_cfg, &pios_dsm_main_cfg,
|
||||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_RM_MAINPORT_HOTTSUMD:
|
|
||||||
case HWSETTINGS_RM_MAINPORT_HOTTSUMH:
|
|
||||||
#if defined(PIOS_INCLUDE_HOTT)
|
|
||||||
{
|
|
||||||
uint32_t pios_usart_hott_id;
|
|
||||||
if (PIOS_USART_Init(&pios_usart_hott_id, &pios_usart_hott_main_cfg)) {
|
|
||||||
PIOS_Assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t pios_hott_id;
|
|
||||||
if (PIOS_HOTT_Init(&pios_hott_id, &pios_usart_com_driver, pios_usart_hott_id,
|
|
||||||
hwsettings_mainport == HWSETTINGS_RM_MAINPORT_HOTTSUMD ? PIOS_HOTT_PROTO_SUMD : PIOS_HOTT_PROTO_SUMH)) {
|
|
||||||
PIOS_Assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t pios_hott_rcvr_id;
|
|
||||||
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
|
||||||
PIOS_Assert(0);
|
|
||||||
}
|
|
||||||
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTTMAINPORT] = pios_hott_rcvr_id;
|
|
||||||
}
|
|
||||||
#endif /* PIOS_INCLUDE_HOTT */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ extern uint32_t pios_packet_handler;
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
// Receiver HSUM input
|
// Receiver HSUM input
|
||||||
//-------------------------
|
//-------------------------
|
||||||
#define PIOS_HOTT_MAX_DEVS 2
|
#define PIOS_HOTT_MAX_DEVS 1
|
||||||
#define PIOS_HOTT_NUM_INPUTS 32
|
#define PIOS_HOTT_NUM_INPUTS 32
|
||||||
|
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -541,46 +541,6 @@ static const struct pios_dsm_cfg pios_dsm_flexi_cfg = {
|
|||||||
* HOTT USART
|
* HOTT USART
|
||||||
*/
|
*/
|
||||||
#include <pios_hott_priv.h>
|
#include <pios_hott_priv.h>
|
||||||
static const struct pios_usart_cfg pios_usart_hott_main_cfg = {
|
|
||||||
.regs = MAIN_USART_REGS,
|
|
||||||
.remap = MAIN_USART_REMAP,
|
|
||||||
.init = {
|
|
||||||
.USART_BaudRate = 115200,
|
|
||||||
.USART_WordLength = USART_WordLength_8b,
|
|
||||||
.USART_Parity = USART_Parity_No,
|
|
||||||
.USART_StopBits = USART_StopBits_1,
|
|
||||||
.USART_HardwareFlowControl = USART_HardwareFlowControl_None,
|
|
||||||
.USART_Mode = USART_Mode_Rx,
|
|
||||||
},
|
|
||||||
.irq = {
|
|
||||||
.init = {
|
|
||||||
.NVIC_IRQChannel = MAIN_USART_IRQ,
|
|
||||||
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_HIGH,
|
|
||||||
.NVIC_IRQChannelSubPriority = 0,
|
|
||||||
.NVIC_IRQChannelCmd = ENABLE,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
.rx = {
|
|
||||||
.gpio = MAIN_USART_RX_GPIO,
|
|
||||||
.init = {
|
|
||||||
.GPIO_Pin = MAIN_USART_RX_PIN,
|
|
||||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
|
||||||
.GPIO_Mode = GPIO_Mode_AF,
|
|
||||||
.GPIO_OType = GPIO_OType_PP,
|
|
||||||
.GPIO_PuPd = GPIO_PuPd_UP
|
|
||||||
},
|
|
||||||
},
|
|
||||||
.tx = {
|
|
||||||
.gpio = MAIN_USART_TX_GPIO,
|
|
||||||
.init = {
|
|
||||||
.GPIO_Pin = MAIN_USART_TX_PIN,
|
|
||||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
|
||||||
.GPIO_Mode = GPIO_Mode_AF,
|
|
||||||
.GPIO_OType = GPIO_OType_PP,
|
|
||||||
.GPIO_PuPd = GPIO_PuPd_UP
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct pios_usart_cfg pios_usart_hott_flexi_cfg = {
|
static const struct pios_usart_cfg pios_usart_hott_flexi_cfg = {
|
||||||
.regs = FLEXI_USART_REGS,
|
.regs = FLEXI_USART_REGS,
|
||||||
|
@ -587,30 +587,6 @@ void PIOS_Board_Init(void)
|
|||||||
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
&pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HWSETTINGS_RM_MAINPORT_HOTTSUMD:
|
|
||||||
case HWSETTINGS_RM_MAINPORT_HOTTSUMH:
|
|
||||||
#if defined(PIOS_INCLUDE_HOTT)
|
|
||||||
{
|
|
||||||
uint32_t pios_usart_hott_id;
|
|
||||||
if (PIOS_USART_Init(&pios_usart_hott_id, &pios_usart_hott_main_cfg)) {
|
|
||||||
PIOS_Assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t pios_hott_id;
|
|
||||||
if (PIOS_HOTT_Init(&pios_hott_id, &pios_usart_com_driver, pios_usart_hott_id,
|
|
||||||
hwsettings_mainport == HWSETTINGS_RM_MAINPORT_HOTTSUMD ? PIOS_HOTT_PROTO_SUMD : PIOS_HOTT_PROTO_SUMH)) {
|
|
||||||
PIOS_Assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t pios_hott_rcvr_id;
|
|
||||||
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
|
||||||
PIOS_Assert(0);
|
|
||||||
}
|
|
||||||
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTTMAINPORT] = pios_hott_rcvr_id;
|
|
||||||
}
|
|
||||||
#endif /* PIOS_INCLUDE_HOTT */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
{
|
{
|
||||||
@ -710,7 +686,7 @@ void PIOS_Board_Init(void)
|
|||||||
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
if (PIOS_RCVR_Init(&pios_hott_rcvr_id, &pios_hott_rcvr_driver, pios_hott_id)) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTTFLEXIPORT] = pios_hott_rcvr_id;
|
pios_rcvr_group_map[MANUALCONTROLSETTINGS_CHANNELGROUPS_HOTT] = pios_hott_rcvr_id;
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_HOTT */
|
#endif /* PIOS_INCLUDE_HOTT */
|
||||||
break;
|
break;
|
||||||
|
@ -261,7 +261,7 @@ extern uint32_t pios_packet_handler;
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
// Receiver HSUM input
|
// Receiver HSUM input
|
||||||
//-------------------------
|
//-------------------------
|
||||||
#define PIOS_HOTT_MAX_DEVS 2
|
#define PIOS_HOTT_MAX_DEVS 1
|
||||||
#define PIOS_HOTT_NUM_INPUTS 32
|
#define PIOS_HOTT_NUM_INPUTS 32
|
||||||
|
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<field name="RM_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Telemetry,PPM+Outputs,Outputs,Telemetry,ComBridge"
|
<field name="RM_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Telemetry,PPM+Outputs,Outputs,Telemetry,ComBridge"
|
||||||
defaultvalue="PWM"
|
defaultvalue="PWM"
|
||||||
limits="%0905NE:PPM+PWM:PPM+Telemetry:Telemetry:ComBridge;"/>
|
limits="%0905NE:PPM+PWM:PPM+Telemetry:Telemetry:ComBridge;"/>
|
||||||
<field name="RM_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM,HoTT SUMD,HoTT SUMH,DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/>
|
<field name="RM_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM,DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/>
|
||||||
<field name="RM_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,I2C,DSM,HoTT SUMD,HoTT SUMH,SRXL,DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/>
|
<field name="RM_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,I2C,DSM,HoTT SUMD,HoTT SUMH,SRXL,DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/>
|
||||||
|
|
||||||
<field name="TelemetrySpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
<field name="TelemetrySpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<description>Settings to indicate how to decode receiver input by @ref ManualControlModule.</description>
|
<description>Settings to indicate how to decode receiver input by @ref ManualControlModule.</description>
|
||||||
<field name="ChannelGroups" units="Channel Group" type="enum"
|
<field name="ChannelGroups" units="Channel Group" type="enum"
|
||||||
elementnames="Throttle,Roll,Pitch,Yaw,FlightMode,Collective,Accessory0,Accessory1,Accessory2,Accessory3"
|
elementnames="Throttle,Roll,Pitch,Yaw,FlightMode,Collective,Accessory0,Accessory1,Accessory2,Accessory3"
|
||||||
options="PWM,PPM,DSM (MainPort),DSM (FlexiPort),S.Bus,HOTT (MainPort),HOTT (FlexiPort),SRXL,GCS,OPLink,None" defaultvalue="None"/>
|
options="PWM,PPM,DSM (MainPort),DSM (FlexiPort),S.Bus,HoTT,SRXL,GCS,OPLink,None" defaultvalue="None"/>
|
||||||
<field name="ChannelNumber" units="channel" type="uint8" defaultvalue="0"
|
<field name="ChannelNumber" units="channel" type="uint8" defaultvalue="0"
|
||||||
elementnames="Throttle,Roll,Pitch,Yaw,FlightMode,Collective,Accessory0,Accessory1,Accessory2,Accessory3"/>
|
elementnames="Throttle,Roll,Pitch,Yaw,FlightMode,Collective,Accessory0,Accessory1,Accessory2,Accessory3"/>
|
||||||
<field name="ChannelMin" units="us" type="int16" defaultvalue="1000"
|
<field name="ChannelMin" units="us" type="int16" defaultvalue="1000"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<object name="ReceiverActivity" singleinstance="true" settings="false" category="System">
|
<object name="ReceiverActivity" singleinstance="true" settings="false" category="System">
|
||||||
<description>Monitors which receiver channels have been active within the last second.</description>
|
<description>Monitors which receiver channels have been active within the last second.</description>
|
||||||
<field name="ActiveGroup" units="Channel Group" type="enum" elements="1"
|
<field name="ActiveGroup" units="Channel Group" type="enum" elements="1"
|
||||||
options="PWM,PPM,DSM (MainPort),DSM (FlexiPort),S.Bus,HoTT (FlexiPort),SRXL,GCS,OPLink,None"
|
options="PWM,PPM,DSM (MainPort),DSM (FlexiPort),S.Bus,HoTT,SRXL,GCS,OPLink,None"
|
||||||
defaultvalue="None"/>
|
defaultvalue="None"/>
|
||||||
<field name="ActiveChannel" units="channel" type="uint8" elements="1"
|
<field name="ActiveChannel" units="channel" type="uint8" elements="1"
|
||||||
defaultvalue="255"/>
|
defaultvalue="255"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user