mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
OP-932 Allows configuring the Revo as coordinator.
This commit is contained in:
parent
6386b12026
commit
bab69401b9
@ -737,6 +737,7 @@ void PIOS_Board_Init(void)
|
|||||||
oplinkStatus.BoardRevision = bdinfo->board_rev;
|
oplinkStatus.BoardRevision = bdinfo->board_rev;
|
||||||
|
|
||||||
/* Is the radio turned on? */
|
/* Is the radio turned on? */
|
||||||
|
bool is_coordinator = (oplinkSettings.Coordinator == OPLINKSETTINGS_COORDINATOR_TRUE);
|
||||||
bool is_oneway = (oplinkSettings.OneWay == OPLINKSETTINGS_ONEWAY_TRUE);
|
bool is_oneway = (oplinkSettings.OneWay == OPLINKSETTINGS_ONEWAY_TRUE);
|
||||||
bool ppm_mode = (oplinkSettings.PPM == OPLINKSETTINGS_PPM_TRUE);
|
bool ppm_mode = (oplinkSettings.PPM == OPLINKSETTINGS_PPM_TRUE);
|
||||||
bool ppm_only = (oplinkSettings.PPMOnly == OPLINKSETTINGS_PPMONLY_TRUE);
|
bool ppm_only = (oplinkSettings.PPMOnly == OPLINKSETTINGS_PPMONLY_TRUE);
|
||||||
@ -783,7 +784,7 @@ void PIOS_Board_Init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set the radio configuration parameters. */
|
/* Set the radio configuration parameters. */
|
||||||
PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, oplinkSettings.ChannelSet, false, is_oneway, ppm_mode, ppm_only);
|
PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, oplinkSettings.ChannelSet, is_coordinator, is_oneway, ppm_mode, ppm_only);
|
||||||
PIOS_RFM22B_SetCoordinatorID(pios_rfm22b_id, oplinkSettings.CoordID);
|
PIOS_RFM22B_SetCoordinatorID(pios_rfm22b_id, oplinkSettings.CoordID);
|
||||||
|
|
||||||
/* Set the PPM callback if we should be receiving PPM. */
|
/* Set the PPM callback if we should be receiving PPM. */
|
||||||
|
@ -246,7 +246,6 @@ void ConfigPipXtremeWidget::updateSettings(UAVObject *object)
|
|||||||
m_oplink->VCPPortLabel->setVisible(false);
|
m_oplink->VCPPortLabel->setVisible(false);
|
||||||
m_oplink->FlexiIOPort->setVisible(false);
|
m_oplink->FlexiIOPort->setVisible(false);
|
||||||
m_oplink->FlexiIOPortLabel->setVisible(false);
|
m_oplink->FlexiIOPortLabel->setVisible(false);
|
||||||
m_oplink->Coordinator->setVisible(false);
|
|
||||||
m_oplink->PPM->setVisible(true);
|
m_oplink->PPM->setVisible(true);
|
||||||
break;
|
break;
|
||||||
case 0x03: // OPLinkMini
|
case 0x03: // OPLinkMini
|
||||||
@ -258,7 +257,6 @@ void ConfigPipXtremeWidget::updateSettings(UAVObject *object)
|
|||||||
m_oplink->VCPPortLabel->setVisible(true);
|
m_oplink->VCPPortLabel->setVisible(true);
|
||||||
m_oplink->FlexiIOPort->setVisible(false);
|
m_oplink->FlexiIOPort->setVisible(false);
|
||||||
m_oplink->FlexiIOPortLabel->setVisible(false);
|
m_oplink->FlexiIOPortLabel->setVisible(false);
|
||||||
m_oplink->Coordinator->setVisible(true);
|
|
||||||
m_oplink->PPM->setVisible(false);
|
m_oplink->PPM->setVisible(false);
|
||||||
break;
|
break;
|
||||||
case 0x0A:
|
case 0x0A:
|
||||||
@ -270,7 +268,6 @@ void ConfigPipXtremeWidget::updateSettings(UAVObject *object)
|
|||||||
m_oplink->VCPPortLabel->setVisible(true);
|
m_oplink->VCPPortLabel->setVisible(true);
|
||||||
m_oplink->FlexiIOPort->setVisible(true);
|
m_oplink->FlexiIOPort->setVisible(true);
|
||||||
m_oplink->FlexiIOPortLabel->setVisible(true);
|
m_oplink->FlexiIOPortLabel->setVisible(true);
|
||||||
m_oplink->Coordinator->setVisible(true);
|
|
||||||
m_oplink->PPM->setVisible(false);
|
m_oplink->PPM->setVisible(false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user