mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
RM: Remove configuration of the RFM22B from the RevoMini pios_board.c. This is in preparation for auto-configuration.
This commit is contained in:
parent
ca31fe99ac
commit
15fc29560a
@ -41,9 +41,6 @@
|
|||||||
#include <uavobjectsinit.h>
|
#include <uavobjectsinit.h>
|
||||||
#include "hwsettings.h"
|
#include "hwsettings.h"
|
||||||
#include "manualcontrolsettings.h"
|
#include "manualcontrolsettings.h"
|
||||||
#if defined(PIOS_INCLUDE_RFM22B)
|
|
||||||
#include <oplinksettings.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sensor configurations
|
* Sensor configurations
|
||||||
@ -632,43 +629,6 @@ void PIOS_Board_Init(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initalize out UAVOs
|
|
||||||
OPLinkSettingsInitialize();
|
|
||||||
OPLinkSettingsData oplinkSettings;
|
|
||||||
OPLinkSettingsGet(&oplinkSettings);
|
|
||||||
|
|
||||||
// Set the maximum radio RF power.
|
|
||||||
switch (oplinkSettings.MaxRFPower)
|
|
||||||
{
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_125:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_0);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_16:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_1);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_316:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_2);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_63:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_3);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_126:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_4);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_25:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_5);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_50:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_6);
|
|
||||||
break;
|
|
||||||
case OPLINKSETTINGS_MAXRFPOWER_100:
|
|
||||||
PIOS_RFM22B_SetTxPower(pios_rfm22b_id, RFM22_tx_pwr_txpow_7);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the radio destination ID.
|
|
||||||
PIOS_RFM22B_SetDestinationId(pios_rfm22b_id, oplinkSettings.PairID);
|
|
||||||
|
|
||||||
// Initialize the packet handler
|
// Initialize the packet handler
|
||||||
PacketHandlerConfig pios_ph_cfg = {
|
PacketHandlerConfig pios_ph_cfg = {
|
||||||
.default_destination_id = 0xffffffff, // Broadcast
|
.default_destination_id = 0xffffffff, // Broadcast
|
||||||
|
Loading…
x
Reference in New Issue
Block a user