1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

Merge remote-tracking branch 'origin/rel-14.10' into next

This commit is contained in:
Fredrik Larsson 2014-11-23 12:15:32 +11:00
commit 1687ef7e8f
27 changed files with 15181 additions and 11122 deletions

View File

@ -109,13 +109,6 @@
*/ */
// #define DSM_LOST_FRAME_COUNTER // #define DSM_LOST_FRAME_COUNTER
/* DSM protocol variations */
enum pios_dsm_proto {
PIOS_DSM_PROTO_DSM2,
PIOS_DSM_PROTO_DSMX10BIT,
PIOS_DSM_PROTO_DSMX11BIT,
};
/* DSM receiver instance configuration */ /* DSM receiver instance configuration */
struct pios_dsm_cfg { struct pios_dsm_cfg {
struct stm32_gpio bind; struct stm32_gpio bind;
@ -127,7 +120,6 @@ extern int32_t PIOS_DSM_Init(uint32_t *dsm_id,
const struct pios_dsm_cfg *cfg, const struct pios_dsm_cfg *cfg,
const struct pios_com_driver *driver, const struct pios_com_driver *driver,
uint32_t lower_id, uint32_t lower_id,
enum pios_dsm_proto proto,
uint8_t bind); uint8_t bind);
#endif /* PIOS_DSM_PRIV_H */ #endif /* PIOS_DSM_PRIV_H */

View File

@ -69,7 +69,6 @@ struct pios_dsm_state {
struct pios_dsm_dev { struct pios_dsm_dev {
enum pios_dsm_dev_magic magic; enum pios_dsm_dev_magic magic;
const struct pios_dsm_cfg *cfg; const struct pios_dsm_cfg *cfg;
enum pios_dsm_proto proto;
struct pios_dsm_state state; struct pios_dsm_state state;
}; };
@ -269,7 +268,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
const struct pios_dsm_cfg *cfg, const struct pios_dsm_cfg *cfg,
const struct pios_com_driver *driver, const struct pios_com_driver *driver,
uint32_t lower_id, uint32_t lower_id,
enum pios_dsm_proto proto,
uint8_t bind) uint8_t bind)
{ {
PIOS_DEBUG_Assert(dsm_id); PIOS_DEBUG_Assert(dsm_id);
@ -285,7 +283,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
/* Bind the configuration to the device instance */ /* Bind the configuration to the device instance */
dsm_dev->cfg = cfg; dsm_dev->cfg = cfg;
dsm_dev->proto = proto;
/* Bind the receiver if requested */ /* Bind the receiver if requested */
if (bind) { if (bind) {

View File

@ -72,7 +72,6 @@ struct pios_dsm_state {
struct pios_dsm_dev { struct pios_dsm_dev {
enum pios_dsm_dev_magic magic; enum pios_dsm_dev_magic magic;
const struct pios_dsm_cfg *cfg; const struct pios_dsm_cfg *cfg;
enum pios_dsm_proto proto;
struct pios_dsm_state state; struct pios_dsm_state state;
}; };
@ -269,7 +268,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
const struct pios_dsm_cfg *cfg, const struct pios_dsm_cfg *cfg,
const struct pios_com_driver *driver, const struct pios_com_driver *driver,
uint32_t lower_id, uint32_t lower_id,
enum pios_dsm_proto proto,
uint8_t bind) uint8_t bind)
{ {
PIOS_DEBUG_Assert(dsm_id); PIOS_DEBUG_Assert(dsm_id);
@ -285,7 +283,6 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id,
/* Bind the configuration to the device instance */ /* Bind the configuration to the device instance */
dsm_dev->cfg = cfg; dsm_dev->cfg = cfg;
dsm_dev->proto = proto;
/* Bind the receiver if requested */ /* Bind the receiver if requested */
if (bind) { if (bind) {

View File

@ -480,27 +480,9 @@ void PIOS_Board_Init(void)
} }
#endif /* PIOS_INCLUDE_GPS */ #endif /* PIOS_INCLUDE_GPS */
break; break;
case HWSETTINGS_CC_MAINPORT_DSM2: case HWSETTINGS_CC_MAINPORT_DSM:
case HWSETTINGS_CC_MAINPORT_DSMX10BIT:
case HWSETTINGS_CC_MAINPORT_DSMX11BIT:
#if defined(PIOS_INCLUDE_DSM) #if defined(PIOS_INCLUDE_DSM)
{ {
enum pios_dsm_proto proto;
switch (hwsettings_cc_mainport) {
case HWSETTINGS_CC_MAINPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_CC_MAINPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_CC_MAINPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
uint32_t pios_usart_dsm_id; uint32_t pios_usart_dsm_id;
if (PIOS_USART_Init(&pios_usart_dsm_id, &pios_usart_dsm_main_cfg)) { if (PIOS_USART_Init(&pios_usart_dsm_id, &pios_usart_dsm_main_cfg)) {
PIOS_Assert(0); PIOS_Assert(0);
@ -511,7 +493,7 @@ void PIOS_Board_Init(void)
&pios_dsm_main_cfg, &pios_dsm_main_cfg,
&pios_usart_com_driver, &pios_usart_com_driver,
pios_usart_dsm_id, pios_usart_dsm_id,
proto, 0)) { 0)) {
PIOS_Assert(0); PIOS_Assert(0);
} }
@ -654,27 +636,9 @@ void PIOS_Board_Init(void)
} }
#endif /* PIOS_INCLUDE_PPM_FLEXI */ #endif /* PIOS_INCLUDE_PPM_FLEXI */
break; break;
case HWSETTINGS_CC_FLEXIPORT_DSM2: case HWSETTINGS_CC_FLEXIPORT_DSM:
case HWSETTINGS_CC_FLEXIPORT_DSMX10BIT:
case HWSETTINGS_CC_FLEXIPORT_DSMX11BIT:
#if defined(PIOS_INCLUDE_DSM) #if defined(PIOS_INCLUDE_DSM)
{ {
enum pios_dsm_proto proto;
switch (hwsettings_cc_flexiport) {
case HWSETTINGS_CC_FLEXIPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_CC_FLEXIPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_CC_FLEXIPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
uint32_t pios_usart_dsm_id; uint32_t pios_usart_dsm_id;
if (PIOS_USART_Init(&pios_usart_dsm_id, &pios_usart_dsm_flexi_cfg)) { if (PIOS_USART_Init(&pios_usart_dsm_id, &pios_usart_dsm_flexi_cfg)) {
PIOS_Assert(0); PIOS_Assert(0);
@ -685,7 +649,7 @@ void PIOS_Board_Init(void)
&pios_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
&pios_usart_com_driver, &pios_usart_com_driver,
pios_usart_dsm_id, pios_usart_dsm_id,
proto, hwsettings_DSMxBind)) { hwsettings_DSMxBind)) {
PIOS_Assert(0); PIOS_Assert(0);
} }

View File

@ -276,7 +276,7 @@ static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
} }
static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg, static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg,
const struct pios_com_driver *usart_com_driver, enum pios_dsm_proto *proto, const struct pios_com_driver *usart_com_driver,
ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind) ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind)
{ {
uint32_t pios_usart_dsm_id; uint32_t pios_usart_dsm_id;
@ -287,7 +287,7 @@ static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
uint32_t pios_dsm_id; uint32_t pios_dsm_id;
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver, if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver,
pios_usart_dsm_id, *proto, *bind)) { pios_usart_dsm_id, *bind)) {
PIOS_Assert(0); PIOS_Assert(0);
} }
@ -614,33 +614,13 @@ void PIOS_Board_Init(void)
} }
#endif #endif
break; break;
case HWSETTINGS_RM_MAINPORT_DSM2: case HWSETTINGS_RM_MAINPORT_DSM:
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_mainport) {
case HWSETTINGS_RM_MAINPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// Force binding to zero on the main port // Force binding to zero on the main port
hwsettings_DSMxBind = 0; hwsettings_DSMxBind = 0;
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
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, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE: case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE) #if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
@ -683,29 +663,10 @@ void PIOS_Board_Init(void)
case HWSETTINGS_RM_FLEXIPORT_GPS: case HWSETTINGS_RM_FLEXIPORT_GPS:
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, -1, &pios_usart_com_driver, &pios_com_gps_id); PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, -1, &pios_usart_com_driver, &pios_com_gps_id);
break; break;
case HWSETTINGS_RM_FLEXIPORT_DSM2: case HWSETTINGS_RM_FLEXIPORT_DSM:
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_flexiport) {
case HWSETTINGS_RM_FLEXIPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg, PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE: case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE:
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE) #if defined(PIOS_INCLUDE_DEBUG_CONSOLE)

View File

@ -418,29 +418,10 @@ void PIOS_Board_Init(void)
#endif /* PIOS_INCLUDE_I2C */ #endif /* PIOS_INCLUDE_I2C */
/* break; /* break;
case HWSETTINGS_RV_FLEXIPORT_DSM2: case HWSETTINGS_RV_FLEXIPORT_DSM:
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_rv_flexiport) {
case HWSETTINGS_RV_FLEXIPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
//TODO: Define the various Channelgroup for Revo dsm inputs and handle here //TODO: Define the various Channelgroup for Revo dsm inputs and handle here
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg, PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT,&hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT,&hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RV_FLEXIPORT_COMAUX: case HWSETTINGS_RV_FLEXIPORT_COMAUX:
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id); PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);

View File

@ -289,7 +289,7 @@ static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
} }
static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg, static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg,
const struct pios_com_driver *usart_com_driver, enum pios_dsm_proto *proto, const struct pios_com_driver *usart_com_driver,
ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind) ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind)
{ {
uint32_t pios_usart_dsm_id; uint32_t pios_usart_dsm_id;
@ -300,7 +300,7 @@ static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
uint32_t pios_dsm_id; uint32_t pios_dsm_id;
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver, if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver,
pios_usart_dsm_id, *proto, *bind)) { pios_usart_dsm_id, *bind)) {
PIOS_Assert(0); PIOS_Assert(0);
} }
@ -636,33 +636,13 @@ void PIOS_Board_Init(void)
} }
#endif #endif
break; break;
case HWSETTINGS_RM_MAINPORT_DSM2: case HWSETTINGS_RM_MAINPORT_DSM:
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_mainport) {
case HWSETTINGS_RM_MAINPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RM_MAINPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RM_MAINPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// Force binding to zero on the main port // Force binding to zero on the main port
hwsettings_DSMxBind = 0; hwsettings_DSMxBind = 0;
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
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, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE: case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE) #if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
@ -705,29 +685,10 @@ void PIOS_Board_Init(void)
case HWSETTINGS_RM_FLEXIPORT_GPS: case HWSETTINGS_RM_FLEXIPORT_GPS:
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, PIOS_COM_GPS_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_gps_id); PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_GPS_RX_BUF_LEN, PIOS_COM_GPS_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_gps_id);
break; break;
case HWSETTINGS_RM_FLEXIPORT_DSM2: case HWSETTINGS_RM_FLEXIPORT_DSM:
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_flexiport) {
case HWSETTINGS_RM_FLEXIPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RM_FLEXIPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RM_FLEXIPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg, PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMFLEXIPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE: case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE:
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE) #if defined(PIOS_INCLUDE_DEBUG_CONSOLE)

View File

@ -352,7 +352,7 @@ static void PIOS_Board_configure_com(const struct pios_usart_cfg *usart_port_cfg
} }
static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg, static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm_cfg, const struct pios_dsm_cfg *pios_dsm_cfg,
const struct pios_com_driver *usart_com_driver, enum pios_dsm_proto *proto, const struct pios_com_driver *usart_com_driver,
ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind) ManualControlSettingsChannelGroupsOptions channelgroup, uint8_t *bind)
{ {
uint32_t pios_usart_dsm_id; uint32_t pios_usart_dsm_id;
@ -363,7 +363,7 @@ static void PIOS_Board_configure_dsm(const struct pios_usart_cfg *pios_usart_dsm
uint32_t pios_dsm_id; uint32_t pios_dsm_id;
if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver, if (PIOS_DSM_Init(&pios_dsm_id, pios_dsm_cfg, usart_com_driver,
pios_usart_dsm_id, *proto, *bind)) { pios_usart_dsm_id, *bind)) {
PIOS_Assert(0); PIOS_Assert(0);
} }
@ -680,29 +680,10 @@ void PIOS_Board_Init(void)
PIOS_Board_configure_com(&pios_usart_aux_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id); PIOS_Board_configure_com(&pios_usart_aux_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id);
break; break;
case HWSETTINGS_RV_AUXPORT_DSM2: case HWSETTINGS_RV_AUXPORT_DSM:
case HWSETTINGS_RV_AUXPORT_DSMX10BIT:
case HWSETTINGS_RV_AUXPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_rv_auxport) {
case HWSETTINGS_RV_AUXPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RV_AUXPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RV_AUXPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
PIOS_Board_configure_dsm(&pios_usart_dsm_aux_cfg, &pios_dsm_aux_cfg, PIOS_Board_configure_dsm(&pios_usart_dsm_aux_cfg, &pios_dsm_aux_cfg,
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RV_AUXPORT_COMAUX: case HWSETTINGS_RV_AUXPORT_COMAUX:
PIOS_Board_configure_com(&pios_usart_aux_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id); PIOS_Board_configure_com(&pios_usart_aux_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
@ -744,29 +725,10 @@ void PIOS_Board_Init(void)
#endif /* PIOS_INCLUDE_SBUS */ #endif /* PIOS_INCLUDE_SBUS */
break; break;
case HWSETTINGS_RV_AUXSBUSPORT_DSM2: case HWSETTINGS_RV_AUXSBUSPORT_DSM:
case HWSETTINGS_RV_AUXSBUSPORT_DSMX10BIT:
case HWSETTINGS_RV_AUXSBUSPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_rv_auxsbusport) {
case HWSETTINGS_RV_AUXSBUSPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RV_AUXSBUSPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RV_AUXSBUSPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
PIOS_Board_configure_dsm(&pios_usart_dsm_auxsbus_cfg, &pios_dsm_auxsbus_cfg, PIOS_Board_configure_dsm(&pios_usart_dsm_auxsbus_cfg, &pios_dsm_auxsbus_cfg,
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RV_AUXSBUSPORT_COMAUX: case HWSETTINGS_RV_AUXSBUSPORT_COMAUX:
PIOS_Board_configure_com(&pios_usart_auxsbus_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id); PIOS_Board_configure_com(&pios_usart_auxsbus_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
@ -797,29 +759,10 @@ void PIOS_Board_Init(void)
#endif /* PIOS_INCLUDE_I2C */ #endif /* PIOS_INCLUDE_I2C */
break; break;
case HWSETTINGS_RV_FLEXIPORT_DSM2: case HWSETTINGS_RV_FLEXIPORT_DSM:
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
{
enum pios_dsm_proto proto;
switch (hwsettings_rv_flexiport) {
case HWSETTINGS_RV_FLEXIPORT_DSM2:
proto = PIOS_DSM_PROTO_DSM2;
break;
case HWSETTINGS_RV_FLEXIPORT_DSMX10BIT:
proto = PIOS_DSM_PROTO_DSMX10BIT;
break;
case HWSETTINGS_RV_FLEXIPORT_DSMX11BIT:
proto = PIOS_DSM_PROTO_DSMX11BIT;
break;
default:
PIOS_Assert(0);
break;
}
// TODO: Define the various Channelgroup for Revo dsm inputs and handle here // TODO: Define the various Channelgroup for Revo dsm inputs and handle here
PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg, PIOS_Board_configure_dsm(&pios_usart_dsm_flexi_cfg, &pios_dsm_flexi_cfg,
&pios_usart_com_driver, &proto, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind); &pios_usart_com_driver, MANUALCONTROLSETTINGS_CHANNELGROUPS_DSMMAINPORT, &hwsettings_DSMxBind);
}
break; break;
case HWSETTINGS_RV_FLEXIPORT_COMAUX: case HWSETTINGS_RV_FLEXIPORT_COMAUX:
PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id); PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_AUX_RX_BUF_LEN, PIOS_COM_AUX_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);

View File

@ -4,7 +4,7 @@
"controller": "CC3D", "controller": "CC3D",
"esc": "Blue 12a Simon k", "esc": "Blue 12a Simon k",
"motor": "SunnySky 2204 2300kv", "motor": "SunnySky 2204 2300kv",
"name": "Blackout Mini h", "name": "Blackout Mini H",
"nick": "Failsafe", "nick": "Failsafe",
"objects": [ "objects": [
{ {

View File

@ -4,7 +4,7 @@
"controller": "CC3D", "controller": "CC3D",
"esc": "tiger 12a", "esc": "tiger 12a",
"motor": "Sunnysky 2204 2300kv", "motor": "Sunnysky 2204 2300kv",
"name": "Droneframes DRQ250 - cf", "name": "Droneframes DRQ250CF",
"nick": "Universe", "nick": "Universe",
"objects": [ "objects": [
{ {

View File

@ -4,7 +4,7 @@
"controller": "CC3D", "controller": "CC3D",
"esc": "afro 30a", "esc": "afro 30a",
"motor": "Tiger 2216 v2 1100kv", "motor": "Tiger 2216 v2 1100kv",
"name": "Qav400", "name": "QAV400",
"nick": "Failsafe", "nick": "Failsafe",
"objects": [ "objects": [
{ {

View File

@ -4,7 +4,7 @@
"controller": "Atom", "controller": "Atom",
"esc": "B-12A Ice Blue ", "esc": "B-12A Ice Blue ",
"motor": "TIGER 2204KV2300", "motor": "TIGER 2204KV2300",
"name": "XHOVER MXP230 ELITE", "name": "Xhover MXP230 Elite",
"nick": "STORMIN", "nick": "STORMIN",
"objects": [ "objects": [
{ {

View File

@ -6179,10 +6179,6 @@ p, li { white-space: pre-wrap; }
<source>Calibration and Configuration Options</source> <source>Calibration and Configuration Options</source>
<translation>Options de Configuration et Calibration</translation> <translation>Options de Configuration et Calibration</translation>
</message> </message>
<message>
<source>Start Configuration Wizard</source>
<translation type="vanished">Démarrer l&apos;Assistant de Configuration</translation>
</message>
<message> <message>
<location/> <location/>
<source>Manual Calibration</source> <source>Manual Calibration</source>
@ -6734,15 +6730,6 @@ Applique et Enregistre tous les paramètres sur la SD</translation>
<source>Live Testing</source> <source>Live Testing</source>
<translation>Test en Temps Réel</translation> <translation>Test en Temps Réel</translation>
</message> </message>
<message>
<source>Setup &quot;RapidESC&quot; here: usual value is 500 Hz for multirotor airframes.
</source>
<translation type="vanished">Configurer ici &quot;TurboPWM&quot; : 500Hz est une valeur classique pour les multirotors.</translation>
</message>
<message>
<source>500</source>
<translation type="vanished">500</translation>
</message>
<message> <message>
<location/> <location/>
<source>Setup &quot;RapidESC&quot; here: usual value is 490 Hz for multirotor airframes. <source>Setup &quot;RapidESC&quot; here: usual value is 490 Hz for multirotor airframes.
@ -9111,7 +9098,7 @@ les données en cache</translation>
<translation>Diagramme de Connexion</translation> <translation>Diagramme de Connexion</translation>
</message> </message>
<message> <message>
<location line="+202"/> <location line="+200"/>
<source>Save File</source> <source>Save File</source>
<translation>Enregistrer Fichier</translation> <translation>Enregistrer Fichier</translation>
</message> </message>
@ -10383,18 +10370,18 @@ p, li { white-space: pre-wrap; }
<location line="+24"/> <location line="+24"/>
<location line="+24"/> <location line="+24"/>
<location line="+44"/> <location line="+44"/>
<location line="+207"/> <location line="+202"/>
<location line="+70"/> <location line="+70"/>
<source>Configuration OK</source> <source>Configuration OK</source>
<translation>Configuration OK</translation> <translation>Configuration OK</translation>
</message> </message>
<message> <message>
<location line="-312"/> <location line="-307"/>
<source>&lt;font color=&apos;red&apos;&gt;ERROR: Assign a Yaw channel&lt;/font&gt;</source> <source>&lt;font color=&apos;red&apos;&gt;ERROR: Assign a Yaw channel&lt;/font&gt;</source>
<translation>&lt;font color=&apos;red&apos;&gt;ERREUR : Veuillez affecter le canal de Yaw&lt;/font&gt;</translation> <translation>&lt;font color=&apos;red&apos;&gt;ERREUR : Veuillez affecter le canal de Yaw&lt;/font&gt;</translation>
</message> </message>
<message> <message>
<location line="+383"/> <location line="+378"/>
<source>&lt;font color=&apos;red&apos;&gt;ERROR: Assign all %1 motor channels&lt;/font&gt;</source> <source>&lt;font color=&apos;red&apos;&gt;ERROR: Assign all %1 motor channels&lt;/font&gt;</source>
<translation>&lt;font color=&apos;red&apos;&gt;ERREUR : Veuillez affecter tous les %1 canaux moteurs&lt;/font&gt;</translation> <translation>&lt;font color=&apos;red&apos;&gt;ERREUR : Veuillez affecter tous les %1 canaux moteurs&lt;/font&gt;</translation>
</message> </message>
@ -10466,26 +10453,26 @@ Voulez-vous toujours continuer ?</translation>
<context> <context>
<name>ConfigInputWidget</name> <name>ConfigInputWidget</name>
<message> <message>
<location filename="../../../src/plugins/config/configinputwidget.cpp" line="+369"/> <location filename="../../../src/plugins/config/configinputwidget.cpp" line="+380"/>
<source>http://wiki.openpilot.org/x/04Cf</source> <source>http://wiki.openpilot.org/x/04Cf</source>
<translatorcomment>Lien Wiki FR</translatorcomment> <translatorcomment>Lien Wiki FR</translatorcomment>
<translation>http://wiki.openpilot.org/x/aIBqAQ</translation> <translation>http://wiki.openpilot.org/x/aIBqAQ</translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+7"/>
<location line="+1141"/> <location line="+1177"/>
<source>Arming Settings are now set to &apos;Always Disarmed&apos; for your safety.</source> <source>Arming Settings are now set to &apos;Always Disarmed&apos; for your safety.</source>
<translatorcomment>Contexte : Onglet &quot;Paramètres d&apos;Armement&quot;</translatorcomment> <translatorcomment>Contexte : Onglet &quot;Paramètres d&apos;Armement&quot;</translatorcomment>
<translation>Pour des raisons de sécurité les Paramètres d&apos;Armement ont é modifiés à &apos;Toujours Désarmé&apos;.</translation> <translation>Pour des raisons de sécurité les Paramètres d&apos;Armement ont é modifiés à &apos;Toujours Désarmé&apos;.</translation>
</message> </message>
<message> <message>
<location line="-1140"/> <location line="-1176"/>
<source>You will have to reconfigure the arming settings manually when the wizard is finished. After the last step of the wizard you will be taken to the Arming Settings screen.</source> <source>You will have to reconfigure the arming settings manually when the wizard is finished. After the last step of the wizard you will be taken to the Arming Settings screen.</source>
<translatorcomment>redirigé vers / sur ?</translatorcomment> <translatorcomment>redirigé vers / sur ?</translatorcomment>
<translation>Vous devrez reconfigurer manuellement les paramètres d&apos;armement lorsque l&apos;assistant sera terminé. Après la dernière étape de l&apos;assistant, vous serez redirigé vers l&apos;écran des Paramètres d&apos;Armement.</translation> <translation>Vous devrez reconfigurer manuellement les paramètres d&apos;armement lorsque l&apos;assistant sera terminé. Après la dernière étape de l&apos;assistant, vous serez redirigé vers l&apos;écran des Paramètres d&apos;Armement.</translation>
</message> </message>
<message> <message>
<location line="+217"/> <location line="+213"/>
<source>Next</source> <source>Next</source>
<translation>Suivant</translation> <translation>Suivant</translation>
</message> </message>
@ -10681,7 +10668,7 @@ Bougez le manche %1.</translation>
<translation> Vous avez la possibilité d&apos;appuyer sur Suivant pour ignorer ce canal.</translation> <translation> Vous avez la possibilité d&apos;appuyer sur Suivant pour ignorer ce canal.</translation>
</message> </message>
<message> <message>
<location line="+650"/> <location line="+690"/>
<source>You will have to reconfigure the arming settings manually when the wizard is finished.</source> <source>You will have to reconfigure the arming settings manually when the wizard is finished.</source>
<translation>Vous devrez reconfigurer les paramètres d&apos;armement manuellement lorsque l&apos;assistant sera terminé.</translation> <translation>Vous devrez reconfigurer les paramètres d&apos;armement manuellement lorsque l&apos;assistant sera terminé.</translation>
</message> </message>
@ -11017,7 +11004,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<location line="+50"/> <location line="+50"/>
<location line="+21"/> <location line="+21"/>
<location line="+12"/> <location line="+12"/>
<location line="+25"/> <location line="+19"/>
<location line="+13"/> <location line="+13"/>
<location line="+15"/> <location line="+15"/>
<location line="+38"/> <location line="+38"/>
@ -11025,7 +11012,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<translation>Inconnu</translation> <translation>Inconnu</translation>
</message> </message>
<message> <message>
<location line="-169"/> <location line="-163"/>
<source>Vehicle type: </source> <source>Vehicle type: </source>
<translation>Type de véhicule : </translation> <translation>Type de véhicule : </translation>
</message> </message>
@ -11152,18 +11139,8 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Spektrum satellite (DSM2)</source> <source>Spektrum Satellite</source>
<translation></translation> <translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Spektrum satellite (DSMX10BIT)</source>
<translation></translation>
</message>
<message>
<location line="+3"/>
<source>Spektrum satellite (DSMX11BIT)</source>
<translation></translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+7"/>
@ -11180,14 +11157,6 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<source>Rapid ESC (%1 Hz)</source> <source>Rapid ESC (%1 Hz)</source>
<translation>Contrôleur Rapide (%1 Hz)</translation> <translation>Contrôleur Rapide (%1 Hz)</translation>
</message> </message>
<message>
<source>Standard ESC (50 Hz)</source>
<translation type="vanished">Contrôleur Standard (50 Hz)</translation>
</message>
<message>
<source>Rapid ESC (500 Hz)</source>
<translation type="vanished">Contrôleur Rapide (500Hz)</translation>
</message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Servo type: </source> <source>Servo type: </source>
@ -11277,7 +11246,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<translation>Échoué !</translation> <translation>Échoué !</translation>
</message> </message>
<message> <message>
<location line="+143"/> <location line="+131"/>
<source>Writing External Mag sensor settings</source> <source>Writing External Mag sensor settings</source>
<translation>Écriture paramètres Compas Externe</translation> <translation>Écriture paramètres Compas Externe</translation>
</message> </message>
@ -11329,7 +11298,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<translation>Écriture paramètres de stabilisation</translation> <translation>Écriture paramètres de stabilisation</translation>
</message> </message>
<message> <message>
<location line="+102"/> <location line="+106"/>
<source>Writing mixer settings</source> <source>Writing mixer settings</source>
<translation>Écriture paramètres mixeur</translation> <translation>Écriture paramètres mixeur</translation>
</message> </message>
@ -11339,7 +11308,7 @@ Double clic sur la légende ou le tracé pour afficher/cacher la légende.</tran
<translation>Écriture paramètres véhicule</translation> <translation>Écriture paramètres véhicule</translation>
</message> </message>
<message> <message>
<location line="+37"/> <location line="+35"/>
<source>Writing manual control defaults</source> <source>Writing manual control defaults</source>
<translation>Écriture contrôles manuels par défaut</translation> <translation>Écriture contrôles manuels par défaut</translation>
</message> </message>
@ -15143,7 +15112,7 @@ Please try again.</source>
<context> <context>
<name>AirSpeedPage</name> <name>AirSpeedPage</name>
<message> <message>
<location filename="../../../src/plugins/setupwizard/pages/airspeedpage.cpp" line="+65"/> <location filename="../../../src/plugins/setupwizard/pages/airspeedpage.cpp" line="+63"/>
<source>OpenPilot Airspeed Sensor Selection</source> <source>OpenPilot Airspeed Sensor Selection</source>
<translation>Sélection Capteur Vitesse Air OpenPilot</translation> <translation>Sélection Capteur Vitesse Air OpenPilot</translation>
</message> </message>

View File

@ -3,7 +3,7 @@ include(../openpilotgcs.pri)
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS = openpilotgcs/translations SUBDIRS = openpilotgcs/translations
DATACOLLECTIONS = dials models pfd sounds diagrams mapicons stylesheets default_configurations DATACOLLECTIONS = cloudconfig default_configurations dials models pfd sounds diagrams mapicons stylesheets
equals(copydata, 1) { equals(copydata, 1) {
for(dir, DATACOLLECTIONS) { for(dir, DATACOLLECTIONS) {

View File

@ -868,8 +868,7 @@ void ConfigInputWidget::setChannel(int newChan)
"Move the %1 stick.")).arg(manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan))); "Move the %1 stick.")).arg(manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan)));
} }
if (manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan).contains("Accessory") || if (manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan).contains("Accessory")) {
manualSettingsObj->getField("ChannelGroups")->getElementNames().at(newChan).contains("FlightMode")) {
ui->wzNext->setEnabled(true); ui->wzNext->setEnabled(true);
ui->wzNext->setText(tr("Next / Skip")); ui->wzNext->setText(tr("Next / Skip"));
ui->wzText->setText(ui->wzText->text() + tr(" Alternatively, click Next to skip this channel.")); ui->wzText->setText(ui->wzText->text() + tr(" Alternatively, click Next to skip this channel."));

View File

@ -162,9 +162,7 @@ void ConnectionDiagram::setupGraphicsScene()
case VehicleConfigurationSource::INPUT_SBUS: case VehicleConfigurationSource::INPUT_SBUS:
elementsToShow << QString("%1sbus").arg(prefix); elementsToShow << QString("%1sbus").arg(prefix);
break; break;
case VehicleConfigurationSource::INPUT_DSMX10: case VehicleConfigurationSource::INPUT_DSM:
case VehicleConfigurationSource::INPUT_DSMX11:
case VehicleConfigurationSource::INPUT_DSM2:
elementsToShow << QString("%1satellite").arg(prefix); elementsToShow << QString("%1satellite").arg(prefix);
break; break;
default: default:

View File

@ -31,6 +31,7 @@
#include <QJsonArray> #include <QJsonArray>
#include <QDir> #include <QDir>
#include "vehicletemplateexportdialog.h" #include "vehicletemplateexportdialog.h"
#include "utils/pathutils.h"
AirframeInitialTuningPage::AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent) : AirframeInitialTuningPage::AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent) :
AbstractWizardPage(wizard, parent), AbstractWizardPage(wizard, parent),
@ -178,7 +179,7 @@ void AirframeInitialTuningPage::loadValidFiles()
} }
m_templates.clear(); m_templates.clear();
QDir templateDir(QString("%1/%2/").arg(VehicleTemplateExportDialog::EXPORT_BASE_NAME).arg(m_dir)); QDir templateDir(QString("%1/%2/").arg(Utils::PathUtils().InsertDataPath("%%DATAPATH%%cloudconfig")).arg(m_dir));
QStringList names; QStringList names;
names << "*.optmpl"; names << "*.optmpl";
templateDir.setNameFilters(names); templateDir.setNameFilters(names);

View File

@ -40,9 +40,7 @@ void AirSpeedPage::initializePage(VehicleConfigurationSource *settings)
// Enable all // Enable all
setItemDisabled(-1, false); setItemDisabled(-1, false);
if (settings->getInputType() == VehicleConfigurationSource::INPUT_SBUS || if (settings->getInputType() == VehicleConfigurationSource::INPUT_SBUS ||
settings->getInputType() == VehicleConfigurationSource::INPUT_DSM2 || settings->getInputType() == VehicleConfigurationSource::INPUT_DSM) {
settings->getInputType() == VehicleConfigurationSource::INPUT_DSMX10 ||
settings->getInputType() == VehicleConfigurationSource::INPUT_DSMX11) {
// Disable non estimated sensors if ports are taken by receivers // Disable non estimated sensors if ports are taken by receivers
setItemDisabled(VehicleConfigurationSource::AIRSPEED_EAGLETREE, true); setItemDisabled(VehicleConfigurationSource::AIRSPEED_EAGLETREE, true);
setItemDisabled(VehicleConfigurationSource::AIRSPEED_MS4525, true); setItemDisabled(VehicleConfigurationSource::AIRSPEED_MS4525, true);

View File

@ -54,7 +54,7 @@ bool InputPage::validatePage()
} else if (ui->sbusButton->isChecked()) { } else if (ui->sbusButton->isChecked()) {
getWizard()->setInputType(SetupWizard::INPUT_SBUS); getWizard()->setInputType(SetupWizard::INPUT_SBUS);
} else if (ui->spectrumButton->isChecked()) { } else if (ui->spectrumButton->isChecked()) {
getWizard()->setInputType(SetupWizard::INPUT_DSM2); getWizard()->setInputType(SetupWizard::INPUT_DSM);
} else { } else {
getWizard()->setInputType(SetupWizard::INPUT_PWM); getWizard()->setInputType(SetupWizard::INPUT_PWM);
} }
@ -85,9 +85,9 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
case VehicleConfigurationSource::INPUT_SBUS: case VehicleConfigurationSource::INPUT_SBUS:
return data.CC_MainPort != HwSettings::CC_MAINPORT_SBUS; return data.CC_MainPort != HwSettings::CC_MAINPORT_SBUS;
case VehicleConfigurationSource::INPUT_DSM2: case VehicleConfigurationSource::INPUT_DSM:
// TODO: Handle all of the DSM types ?? Which is most common? // TODO: Handle all of the DSM types ?? Which is most common?
return data.CC_MainPort != HwSettings::CC_MAINPORT_DSM2; return data.CC_MainPort != HwSettings::CC_MAINPORT_DSM;
default: return true; default: return true;
} }
@ -106,9 +106,9 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
case VehicleConfigurationSource::INPUT_SBUS: case VehicleConfigurationSource::INPUT_SBUS:
return data.RM_MainPort != HwSettings::CC_MAINPORT_SBUS; return data.RM_MainPort != HwSettings::CC_MAINPORT_SBUS;
case VehicleConfigurationSource::INPUT_DSM2: case VehicleConfigurationSource::INPUT_DSM:
// TODO: Handle all of the DSM types ?? Which is most common? // TODO: Handle all of the DSM types ?? Which is most common?
return data.RM_MainPort != HwSettings::CC_MAINPORT_DSM2; return data.RM_MainPort != HwSettings::CC_MAINPORT_DSM;
default: return true; default: return true;
} }

View File

@ -353,14 +353,8 @@ QString SetupWizard::getSummaryText()
case INPUT_SBUS: case INPUT_SBUS:
summary.append(tr("Futaba S.Bus")); summary.append(tr("Futaba S.Bus"));
break; break;
case INPUT_DSM2: case INPUT_DSM:
summary.append(tr("Spektrum satellite (DSM2)")); summary.append(tr("Spektrum Satellite"));
break;
case INPUT_DSMX10:
summary.append(tr("Spektrum satellite (DSMX10BIT)"));
break;
case INPUT_DSMX11:
summary.append(tr("Spektrum satellite (DSMX11BIT)"));
break; break;
default: default:
summary.append(tr("Unknown")); summary.append(tr("Unknown"));

View File

@ -157,14 +157,8 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
data.CC_MainPort = HwSettings::CC_MAINPORT_SBUS; data.CC_MainPort = HwSettings::CC_MAINPORT_SBUS;
data.CC_FlexiPort = HwSettings::CC_FLEXIPORT_TELEMETRY; data.CC_FlexiPort = HwSettings::CC_FLEXIPORT_TELEMETRY;
break; break;
case VehicleConfigurationSource::INPUT_DSMX10: case VehicleConfigurationSource::INPUT_DSM:
data.CC_FlexiPort = HwSettings::CC_FLEXIPORT_DSMX10BIT; data.CC_FlexiPort = HwSettings::CC_FLEXIPORT_DSM;
break;
case VehicleConfigurationSource::INPUT_DSMX11:
data.CC_FlexiPort = HwSettings::CC_FLEXIPORT_DSMX11BIT;
break;
case VehicleConfigurationSource::INPUT_DSM2:
data.CC_FlexiPort = HwSettings::CC_FLEXIPORT_DSM2;
break; break;
default: default:
break; break;
@ -173,14 +167,17 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
case VehicleConfigurationSource::CONTROLLER_REVO: case VehicleConfigurationSource::CONTROLLER_REVO:
case VehicleConfigurationSource::CONTROLLER_NANO: case VehicleConfigurationSource::CONTROLLER_NANO:
case VehicleConfigurationSource::CONTROLLER_DISCOVERYF4: case VehicleConfigurationSource::CONTROLLER_DISCOVERYF4:
// Reset all ports // Reset all ports to their defaults
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_DISABLED; data.RM_RcvrPort = HwSettings::RM_RCVRPORT_DISABLED;
// Default mainport to be active telemetry link
data.RM_MainPort = HwSettings::RM_MAINPORT_TELEMETRY;
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DISABLED; data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DISABLED;
// Revo uses inbuilt Modem do not set mainport to be active telemetry link for the Revo
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
data.RM_MainPort = HwSettings::RM_MAINPORT_DISABLED;
} else {
data.RM_MainPort = HwSettings::RM_MAINPORT_TELEMETRY;
}
switch (m_configSource->getInputType()) { switch (m_configSource->getInputType()) {
case VehicleConfigurationSource::INPUT_PWM: case VehicleConfigurationSource::INPUT_PWM:
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PWM; data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PWM;
@ -189,18 +186,14 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PPM; data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PPM;
break; break;
case VehicleConfigurationSource::INPUT_SBUS: case VehicleConfigurationSource::INPUT_SBUS:
// We have to set telemetry on flexport since s.bus needs the mainport.
data.RM_MainPort = HwSettings::RM_MAINPORT_SBUS; data.RM_MainPort = HwSettings::RM_MAINPORT_SBUS;
// We have to set telemetry on flexport since s.bus needs the mainport on all but Revo.
if (m_configSource->getControllerType() != VehicleConfigurationSource::CONTROLLER_REVO) {
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_TELEMETRY; data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_TELEMETRY;
}
break; break;
case VehicleConfigurationSource::INPUT_DSMX10: case VehicleConfigurationSource::INPUT_DSM:
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSMX10BIT; data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSM;
break;
case VehicleConfigurationSource::INPUT_DSMX11:
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSMX11BIT;
break;
case VehicleConfigurationSource::INPUT_DSM2:
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSM2;
break; break;
default: default:
break; break;
@ -741,9 +734,7 @@ void VehicleConfigurationHelper::applyManualControlDefaults()
case VehicleConfigurationSource::INPUT_SBUS: case VehicleConfigurationSource::INPUT_SBUS:
channelType = ManualControlSettings::CHANNELGROUPS_SBUS; channelType = ManualControlSettings::CHANNELGROUPS_SBUS;
break; break;
case VehicleConfigurationSource::INPUT_DSMX10: case VehicleConfigurationSource::INPUT_DSM:
case VehicleConfigurationSource::INPUT_DSMX11:
case VehicleConfigurationSource::INPUT_DSM2:
channelType = ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT; channelType = ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT;
break; break;
default: default:

View File

@ -64,7 +64,7 @@ public:
FIXED_WING_DUAL_AILERON, FIXED_WING_AILERON, FIXED_WING_ELEVON, FIXED_WING_VTAIL, HELI_CCPM }; FIXED_WING_DUAL_AILERON, FIXED_WING_AILERON, FIXED_WING_ELEVON, FIXED_WING_VTAIL, HELI_CCPM };
enum ESC_TYPE { ESC_RAPID, ESC_STANDARD, ESC_UNKNOWN }; enum ESC_TYPE { ESC_RAPID, ESC_STANDARD, ESC_UNKNOWN };
enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_UNKNOWN }; enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_UNKNOWN };
enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSMX10, INPUT_DSMX11, INPUT_DSM2, INPUT_UNKNOWN }; enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_UNKNOWN };
enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED }; enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED };
enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED }; enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED };
enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED }; enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED };

View File

@ -1,4 +1,4 @@
# #
# Project: OpenPilot # Project: OpenPilot
# NSIS configuration file for OpenPilot GCS # NSIS configuration file for OpenPilot GCS
# The OpenPilot Team, http://www.openpilot.org, Copyright (C) 2010-2014. # The OpenPilot Team, http://www.openpilot.org, Copyright (C) 2010-2014.
@ -72,7 +72,7 @@
VIAddVersionKey "Comments" "${INSTALLER_NAME}. ${BUILD_DESCRIPTION}" VIAddVersionKey "Comments" "${INSTALLER_NAME}. ${BUILD_DESCRIPTION}"
VIAddVersionKey "CompanyName" "The OpenPilot Team, http://www.openpilot.org" VIAddVersionKey "CompanyName" "The OpenPilot Team, http://www.openpilot.org"
VIAddVersionKey "LegalTrademarks" "${PRODUCT_NAME} is a trademark of The OpenPilot Team" VIAddVersionKey "LegalTrademarks" "${PRODUCT_NAME} is a trademark of The OpenPilot Team"
VIAddVersionKey "LegalCopyright" "© 2010-2014 The OpenPilot Team" VIAddVersionKey "LegalCopyright" "© 2010-2014 The OpenPilot Team"
VIAddVersionKey "FileDescription" "${INSTALLER_NAME}" VIAddVersionKey "FileDescription" "${INSTALLER_NAME}"
;-------------------------------- ;--------------------------------
@ -93,7 +93,7 @@
;-------------------------------- ;--------------------------------
; Branding ; Branding
BrandingText "© 2010-2014 The OpenPilot Team, http://www.openpilot.org" BrandingText "© 2010-2014 The OpenPilot Team, http://www.openpilot.org"
!define MUI_ICON "${NSIS_DATA_TREE}\resources\openpilot.ico" !define MUI_ICON "${NSIS_DATA_TREE}\resources\openpilot.ico"
!define MUI_HEADERIMAGE !define MUI_HEADERIMAGE
@ -193,10 +193,10 @@ SectionEnd
; Copy GCS resources ; Copy GCS resources
Section "-Resources" InSecResources Section "-Resources" InSecResources
SetOutPath "$INSTDIR\share\openpilotgcs\cloudconfig"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\cloudconfig\*"
SetOutPath "$INSTDIR\share\openpilotgcs\default_configurations" SetOutPath "$INSTDIR\share\openpilotgcs\default_configurations"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\default_configurations\*" File /r "${GCS_BUILD_TREE}\share\openpilotgcs\default_configurations\*"
SetOutPath "$INSTDIR\share\openpilotgcs\stylesheets"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\stylesheets\*"
SetOutPath "$INSTDIR\share\openpilotgcs\diagrams" SetOutPath "$INSTDIR\share\openpilotgcs\diagrams"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\diagrams\*" File /r "${GCS_BUILD_TREE}\share\openpilotgcs\diagrams\*"
SetOutPath "$INSTDIR\share\openpilotgcs\dials" SetOutPath "$INSTDIR\share\openpilotgcs\dials"
@ -207,6 +207,8 @@ Section "-Resources" InSecResources
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\models\*" File /r "${GCS_BUILD_TREE}\share\openpilotgcs\models\*"
SetOutPath "$INSTDIR\share\openpilotgcs\pfd" SetOutPath "$INSTDIR\share\openpilotgcs\pfd"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\pfd\*" File /r "${GCS_BUILD_TREE}\share\openpilotgcs\pfd\*"
SetOutPath "$INSTDIR\share\openpilotgcs\stylesheets"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\stylesheets\*"
SectionEnd SectionEnd
; Copy Notify plugin sound files ; Copy Notify plugin sound files

View File

@ -2,19 +2,19 @@
<object name="HwSettings" singleinstance="true" settings="true" category="System"> <object name="HwSettings" singleinstance="true" settings="true" category="System">
<description>Selection of optional hardware configurations.</description> <description>Selection of optional hardware configurations.</description>
<field name="CC_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Outputs,Outputs" defaultvalue="PWM"/> <field name="CC_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Outputs,Outputs" defaultvalue="PWM"/>
<field name="CC_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM2,DSMX (10bit),DSMX (11bit),DebugConsole,ComBridge,OsdHk" defaultvalue="Telemetry"/> <field name="CC_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM,DebugConsole,ComBridge,OsdHk" defaultvalue="Telemetry"/>
<field name="CC_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,I2C,PPM,DSM2,DSMX (10bit),DSMX (11bit),DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/> <field name="CC_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,I2C,PPM,DSM,DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/>
<field name="RV_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+Outputs,Outputs" defaultvalue="PWM"/> <field name="RV_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+Outputs,Outputs" defaultvalue="PWM"/>
<field name="RV_AuxPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,DSM2,DSMX (10bit),DSMX (11bit),ComAux,ComBridge,OsdHk" defaultvalue="Disabled"/> <field name="RV_AuxPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,DSM,ComAux,ComBridge,OsdHk" defaultvalue="Disabled"/>
<field name="RV_AuxSBusPort" units="function" type="enum" elements="1" options="Disabled,S.Bus,DSM2,DSMX (10bit),DSMX (11bit),ComAux,ComBridge,OsdHk" defaultvalue="Disabled"/> <field name="RV_AuxSBusPort" units="function" type="enum" elements="1" options="Disabled,S.Bus,DSM,ComAux,ComBridge,OsdHk" defaultvalue="Disabled"/>
<field name="RV_FlexiPort" units="function" type="enum" elements="1" options="Disabled,I2C,DSM2,DSMX (10bit),DSMX (11bit),ComAux,ComBridge" defaultvalue="Disabled"/> <field name="RV_FlexiPort" units="function" type="enum" elements="1" options="Disabled,I2C,DSM,ComAux,ComBridge" defaultvalue="Disabled"/>
<field name="RV_TelemetryPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,ComAux,ComBridge" defaultvalue="Telemetry"/> <field name="RV_TelemetryPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,ComAux,ComBridge" defaultvalue="Telemetry"/>
<field name="RV_GPSPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,ComAux,ComBridge" defaultvalue="GPS"/> <field name="RV_GPSPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,ComAux,ComBridge" defaultvalue="GPS"/>
<field name="RM_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Telemetry,PPM+Outputs,Outputs,Telemetry" defaultvalue="PWM"/> <field name="RM_RcvrPort" units="function" type="enum" elements="1" options="Disabled,PWM,PPM,PPM+PWM,PPM+Telemetry,PPM+Outputs,Outputs,Telemetry" defaultvalue="PWM"/>
<field name="RM_MainPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,S.Bus,DSM2,DSMX (10bit),DSMX (11bit),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,DSM2,DSMX (10bit),DSMX (11bit),DebugConsole,ComBridge,OsdHk" defaultvalue="Disabled"/> <field name="RM_FlexiPort" units="function" type="enum" elements="1" options="Disabled,Telemetry,GPS,I2C,DSM,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"/>
<field name="GPSSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200,230400" defaultvalue="57600"/> <field name="GPSSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200,230400" defaultvalue="57600"/>