From 137c183ec223cf37498a7541130c5c00b413e75a Mon Sep 17 00:00:00 2001 From: Karl Knutsson Date: Sat, 24 Jan 2015 15:30:42 +0100 Subject: [PATCH] OP-1522 Remove unused channel set cfg Remove unused channel set configuration option. With the new channel allocation the old channel set configuration isn't needed. --- flight/pios/common/pios_rfm22b.c | 5 +-- flight/pios/inc/pios_rfm22b.h | 2 +- .../discoveryf4bare/firmware/pios_board.c | 2 +- .../boards/oplinkmini/firmware/pios_board.c | 2 +- .../boards/revolution/firmware/pios_board.c | 2 +- .../src/plugins/config/configoplinkwidget.cpp | 1 - .../openpilotgcs/src/plugins/config/oplink.ui | 38 ------------------- shared/uavobjectdefinition/oplinksettings.xml | 1 - 8 files changed, 6 insertions(+), 47 deletions(-) diff --git a/flight/pios/common/pios_rfm22b.c b/flight/pios/common/pios_rfm22b.c index 812bc4b8f..5e607eca2 100644 --- a/flight/pios/common/pios_rfm22b.c +++ b/flight/pios/common/pios_rfm22b.c @@ -74,7 +74,6 @@ #define RFM22B_LINK_QUALITY_THRESHOLD 20 #define RFM22B_DEFAULT_MIN_CHANNEL 0 #define RFM22B_DEFAULT_MAX_CHANNEL 250 -#define RFM22B_DEFAULT_CHANNEL_SET 24 #define RFM22B_PPM_ONLY_DATARATE RFM22_datarate_9600 // PPM encoding limits @@ -435,7 +434,7 @@ int32_t PIOS_RFM22B_Init(uint32_t *rfm22b_id, uint32_t spi_id, uint32_t slave_nu // Initialize the channels. PIOS_RFM22B_SetChannelConfig(*rfm22b_id, RFM22B_DEFAULT_RX_DATARATE, RFM22B_DEFAULT_MIN_CHANNEL, - RFM22B_DEFAULT_MAX_CHANNEL, RFM22B_DEFAULT_CHANNEL_SET, false, false, false, false); + RFM22B_DEFAULT_MAX_CHANNEL, false, false, false, false); // Create the event queue rfm22b_dev->eventQueue = xQueueCreate(EVENT_QUEUE_SIZE, sizeof(enum pios_radio_event)); @@ -583,7 +582,7 @@ void PIOS_RFM22B_SetTxPower(uint32_t rfm22b_id, enum rfm22b_tx_power tx_pwr) * @param[in] ppm_mode Should this modem send/receive ppm packets? * @param[in] oneway Only the coordinator can send packets if true. */ -void PIOS_RFM22B_SetChannelConfig(uint32_t rfm22b_id, enum rfm22b_datarate datarate, uint8_t min_chan, uint8_t max_chan, __attribute__ ((unused)) uint8_t chan_set, bool coordinator, bool oneway, bool ppm_mode, bool ppm_only) +void PIOS_RFM22B_SetChannelConfig(uint32_t rfm22b_id, enum rfm22b_datarate datarate, uint8_t min_chan, uint8_t max_chan, bool coordinator, bool oneway, bool ppm_mode, bool ppm_only) { struct pios_rfm22b_dev *rfm22b_dev = (struct pios_rfm22b_dev *)rfm22b_id; diff --git a/flight/pios/inc/pios_rfm22b.h b/flight/pios/inc/pios_rfm22b.h index 7581300d8..49af876b0 100644 --- a/flight/pios/inc/pios_rfm22b.h +++ b/flight/pios/inc/pios_rfm22b.h @@ -103,7 +103,7 @@ struct rfm22b_stats { extern int32_t PIOS_RFM22B_Init(uint32_t *rfb22b_id, uint32_t spi_id, uint32_t slave_num, const struct pios_rfm22b_cfg *cfg); extern void PIOS_RFM22B_Reinit(uint32_t rfb22b_id); extern void PIOS_RFM22B_SetTxPower(uint32_t rfm22b_id, enum rfm22b_tx_power tx_pwr); -extern void PIOS_RFM22B_SetChannelConfig(uint32_t rfm22b_id, enum rfm22b_datarate datarate, uint8_t min_chan, uint8_t max_chan, uint8_t chan_set, bool coordinator, bool oneway, bool ppm_mode, bool ppm_only); +extern void PIOS_RFM22B_SetChannelConfig(uint32_t rfm22b_id, enum rfm22b_datarate datarate, uint8_t min_chan, uint8_t max_chan, bool coordinator, bool oneway, bool ppm_mode, bool ppm_only); extern void PIOS_RFM22B_SetCoordinatorID(uint32_t rfm22b_id, uint32_t coord_id); extern uint32_t PIOS_RFM22B_DeviceID(uint32_t rfb22b_id); extern void PIOS_RFM22B_GetStats(uint32_t rfm22b_id, struct rfm22b_stats *stats); diff --git a/flight/targets/boards/discoveryf4bare/firmware/pios_board.c b/flight/targets/boards/discoveryf4bare/firmware/pios_board.c index 7f8cf2812..c4f7b7309 100644 --- a/flight/targets/boards/discoveryf4bare/firmware/pios_board.c +++ b/flight/targets/boards/discoveryf4bare/firmware/pios_board.c @@ -747,7 +747,7 @@ void PIOS_Board_Init(void) } /* Set the radio configuration parameters. */ - PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, oplinkSettings.ChannelSet, is_coordinator, is_oneway, ppm_mode, ppm_only); + PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, is_coordinator, is_oneway, ppm_mode, ppm_only); PIOS_RFM22B_SetCoordinatorID(pios_rfm22b_id, oplinkSettings.CoordID); /* Set the PPM callback if we should be receiving PPM. */ diff --git a/flight/targets/boards/oplinkmini/firmware/pios_board.c b/flight/targets/boards/oplinkmini/firmware/pios_board.c index e468162f3..a682ec241 100644 --- a/flight/targets/boards/oplinkmini/firmware/pios_board.c +++ b/flight/targets/boards/oplinkmini/firmware/pios_board.c @@ -439,7 +439,7 @@ void PIOS_Board_Init(void) // Set the radio configuration parameters. PIOS_RFM22B_SetCoordinatorID(pios_rfm22b_id, oplinkSettings.CoordID); - PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, oplinkSettings.ChannelSet, is_coordinator, is_oneway, ppm_mode, ppm_only); + PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, is_coordinator, is_oneway, ppm_mode, ppm_only); /* Set the PPM callback if we should be receiving PPM. */ if (ppm_mode) { diff --git a/flight/targets/boards/revolution/firmware/pios_board.c b/flight/targets/boards/revolution/firmware/pios_board.c index df635caab..3723845e9 100644 --- a/flight/targets/boards/revolution/firmware/pios_board.c +++ b/flight/targets/boards/revolution/firmware/pios_board.c @@ -771,7 +771,7 @@ void PIOS_Board_Init(void) /* Set the radio configuration parameters. */ PIOS_RFM22B_SetCoordinatorID(pios_rfm22b_id, oplinkSettings.CoordID); - PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, oplinkSettings.ChannelSet, is_coordinator, is_oneway, ppm_mode, ppm_only); + PIOS_RFM22B_SetChannelConfig(pios_rfm22b_id, datarate, oplinkSettings.MinChannel, oplinkSettings.MaxChannel, is_coordinator, is_oneway, ppm_mode, ppm_only); /* Set the PPM callback if we should be receiving PPM. */ if (ppm_mode) { diff --git a/ground/openpilotgcs/src/plugins/config/configoplinkwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoplinkwidget.cpp index db08563f8..56a42658e 100644 --- a/ground/openpilotgcs/src/plugins/config/configoplinkwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoplinkwidget.cpp @@ -67,7 +67,6 @@ ConfigOPLinkWidget::ConfigOPLinkWidget(QWidget *parent) : ConfigTaskWidget(paren addWidgetBinding("OPLinkSettings", "MaxRFPower", m_oplink->MaxRFTxPower); addWidgetBinding("OPLinkSettings", "MinChannel", m_oplink->MinimumChannel); addWidgetBinding("OPLinkSettings", "MaxChannel", m_oplink->MaximumChannel); - addWidgetBinding("OPLinkSettings", "ChannelSet", m_oplink->ChannelSet); addWidgetBinding("OPLinkSettings", "CoordID", m_oplink->CoordID); addWidgetBinding("OPLinkSettings", "Coordinator", m_oplink->Coordinator); addWidgetBinding("OPLinkSettings", "OneWay", m_oplink->OneWayLink); diff --git a/ground/openpilotgcs/src/plugins/config/oplink.ui b/ground/openpilotgcs/src/plugins/config/oplink.ui index ca616b2e6..9e462577f 100644 --- a/ground/openpilotgcs/src/plugins/config/oplink.ui +++ b/ground/openpilotgcs/src/plugins/config/oplink.ui @@ -312,44 +312,6 @@ - - - - - 50 - false - - - - Channel Set - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 60 - 16777215 - - - - - 50 - false - - - - Sets the random sequence of channels to use for frequency hopping. - - - 250 - - - diff --git a/shared/uavobjectdefinition/oplinksettings.xml b/shared/uavobjectdefinition/oplinksettings.xml index b0f629acc..ac631616c 100644 --- a/shared/uavobjectdefinition/oplinksettings.xml +++ b/shared/uavobjectdefinition/oplinksettings.xml @@ -13,7 +13,6 @@ -