mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
LP-190: Removed rfm22breceiver UAVO.
This commit is contained in:
parent
0738c8a78a
commit
2e2bb1b20b
@ -475,12 +475,12 @@ static void PPMInputTask(__attribute__((unused)) void *parameters)
|
||||
// Wait for the receiver semaphore.
|
||||
if (xSemaphoreTake(sem, PPM_INPUT_TIMEOUT) == pdTRUE) {
|
||||
// Read the receiver inputs.
|
||||
for (uint8_t i = 0; i < OPLINKRECEIVER_CHANNEL_NUMELEM; ++i) {
|
||||
for (uint8_t i = 0; i < RFM22B_PPM_NUM_CHANNELS; ++i) {
|
||||
channels[i] = PIOS_RCVR_Read(PIOS_PPM_RECEIVER, i + 1);
|
||||
}
|
||||
} else {
|
||||
// Failsafe
|
||||
for (uint8_t i = 0; i < OPLINKRECEIVER_CHANNEL_NUMELEM; ++i) {
|
||||
for (uint8_t i = 0; i < RFM22B_PPM_NUM_CHANNELS; ++i) {
|
||||
channels[i] = PIOS_RCVR_INVALID;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "pios_openlrs_priv.h"
|
||||
|
||||
#include <uavobjectmanager.h>
|
||||
#include <rfm22breceiver.h>
|
||||
#include <oplinkreceiver.h>
|
||||
#include <pios_openlrs_priv.h>
|
||||
#include <pios_openlrs_rcvr_priv.h>
|
||||
|
||||
@ -99,7 +99,7 @@ extern int32_t PIOS_OpenLRS_Rcvr_Init(uint32_t *openlrs_rcvr_id, uintptr_t openl
|
||||
}
|
||||
|
||||
/* Register uavobj callback */
|
||||
RFM22BReceiverInitialize();
|
||||
OPLinkReceiverInitialize();
|
||||
|
||||
*openlrs_rcvr_id = (uintptr_t)openlrs_rcvr_dev;
|
||||
PIOS_OpenLRS_RegisterRcvr(openlrs_id, *openlrs_rcvr_id);
|
||||
@ -116,7 +116,7 @@ extern int32_t PIOS_OpenLRS_Rcvr_Init(uint32_t *openlrs_rcvr_id, uintptr_t openl
|
||||
/**
|
||||
* Called from the core driver to set the channel values whenever a
|
||||
* PPM packet is received. This method stores the data locally as well
|
||||
* as sets the data into the RFM22BReceiver UAVO for visibility
|
||||
* as sets the data into the OPLinkReceiver UAVO for visibility
|
||||
*/
|
||||
int32_t PIOS_OpenLRS_Rcvr_UpdateChannels(uint32_t openlrs_rcvr_id, int16_t *channels)
|
||||
{
|
||||
@ -188,7 +188,7 @@ static void PIOS_OpenLRS_Rcvr_Supervisor(uint32_t openlrs_rcvr_id)
|
||||
openlrs_rcvr_dev->supv_timer = 0;
|
||||
|
||||
if (!openlrs_rcvr_dev->fresh) {
|
||||
for (int32_t i = 0; i < RFM22BRECEIVER_CHANNEL_NUMELEM;
|
||||
for (int32_t i = 0; i < OPLINKRECEIVER_CHANNEL_NUMELEM;
|
||||
i++) {
|
||||
openlrs_rcvr_dev->channels[i] = PIOS_RCVR_TIMEOUT;
|
||||
}
|
||||
@ -202,17 +202,17 @@ static void openlrs_rcvr_update_uavo(struct pios_openlrs_rcvr_dev *rcvr_dev)
|
||||
// Also store the received data in a UAVO for easy
|
||||
// debugging. However this is not what is used in
|
||||
// ManualControl (it fetches directly from this driver)
|
||||
RFM22BReceiverData rcvr;
|
||||
OPLinkReceiverData rcvr;
|
||||
|
||||
for (uint8_t i = 0; i < OPENLRS_PPM_NUM_CHANNELS; i++) {
|
||||
if (i < RFM22BRECEIVER_CHANNEL_NUMELEM) {
|
||||
if (i < OPLINKRECEIVER_CHANNEL_NUMELEM) {
|
||||
rcvr.Channel[i] = rcvr_dev->channels[i];
|
||||
}
|
||||
}
|
||||
for (int i = OPENLRS_PPM_NUM_CHANNELS - 1; i < RFM22BRECEIVER_CHANNEL_NUMELEM; i++) {
|
||||
for (int i = OPENLRS_PPM_NUM_CHANNELS - 1; i < OPLINKRECEIVER_CHANNEL_NUMELEM; i++) {
|
||||
rcvr.Channel[i] = PIOS_RCVR_INVALID;
|
||||
}
|
||||
RFM22BReceiverSet(&rcvr);
|
||||
OPLinkReceiverSet(&rcvr);
|
||||
}
|
||||
|
||||
#endif /* PIOS_INCLUDE_OPENLRS */
|
||||
|
@ -128,8 +128,6 @@ UAVOBJSRCFILENAMES += takeofflocation
|
||||
UAVOBJSRCFILENAMES += perfcounter
|
||||
UAVOBJSRCFILENAMES += systemidentsettings
|
||||
UAVOBJSRCFILENAMES += systemidentstate
|
||||
UAVOBJSRCFILENAMES += openlrs
|
||||
UAVOBJSRCFILENAMES += rfm22breceiver
|
||||
|
||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
|
||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||
|
@ -128,8 +128,6 @@ UAVOBJSRCFILENAMES += takeofflocation
|
||||
UAVOBJSRCFILENAMES += perfcounter
|
||||
UAVOBJSRCFILENAMES += systemidentsettings
|
||||
UAVOBJSRCFILENAMES += systemidentstate
|
||||
UAVOBJSRCFILENAMES += openlrs
|
||||
UAVOBJSRCFILENAMES += rfm22breceiver
|
||||
|
||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
|
||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "ui_inputchannelform.h"
|
||||
|
||||
#include "manualcontrolsettings.h"
|
||||
#include "rfm22breceiver.h"
|
||||
#include "gcsreceiver.h"
|
||||
|
||||
InputChannelForm::InputChannelForm(const int index, QWidget *parent) :
|
||||
@ -155,6 +154,7 @@ void InputChannelForm::groupUpdated()
|
||||
case ManualControlSettings::CHANNELGROUPS_PPM:
|
||||
case ManualControlSettings::CHANNELGROUPS_SRXL:
|
||||
case ManualControlSettings::CHANNELGROUPS_EXBUS:
|
||||
case ManualControlSettings::CHANNELGROUPS_OPENLRS:
|
||||
count = 16;
|
||||
break;
|
||||
case ManualControlSettings::CHANNELGROUPS_SBUS:
|
||||
@ -166,9 +166,6 @@ void InputChannelForm::groupUpdated()
|
||||
case ManualControlSettings::CHANNELGROUPS_GCS:
|
||||
count = GCSReceiver::CHANNEL_NUMELEM;
|
||||
break;
|
||||
case ManualControlSettings::CHANNELGROUPS_OPENLRS:
|
||||
count = RFM22BReceiver::CHANNEL_NUMELEM;
|
||||
break;
|
||||
case ManualControlSettings::CHANNELGROUPS_NONE:
|
||||
count = 0;
|
||||
break;
|
||||
|
@ -125,7 +125,6 @@ UAVOBJS = \
|
||||
$${UAVOBJ_XML_DIR}/receiverstatus.xml \
|
||||
$${UAVOBJ_XML_DIR}/revocalibration.xml \
|
||||
$${UAVOBJ_XML_DIR}/revosettings.xml \
|
||||
$${UAVOBJ_XML_DIR}/rfm22breceiver.xml \
|
||||
$${UAVOBJ_XML_DIR}/sonaraltitude.xml \
|
||||
$${UAVOBJ_XML_DIR}/stabilizationbank.xml \
|
||||
$${UAVOBJ_XML_DIR}/stabilizationdesired.xml \
|
||||
|
@ -1,7 +1,7 @@
|
||||
<xml>
|
||||
<object name="OPLinkReceiver" singleinstance="true" settings="false" category="System">
|
||||
<description>A receiver channel group carried over the OPLink radio.</description>
|
||||
<field name="Channel" units="us" type="int16" elements="8"/>
|
||||
<field name="Channel" units="us" type="int16" elements="16"/>
|
||||
<access gcs="readonly" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
|
@ -1,10 +0,0 @@
|
||||
<xml>
|
||||
<object name="RFM22BReceiver" singleinstance="true" settings="false">
|
||||
<description>A receiver channel group carried over the RFM22B radio.</description>
|
||||
<field name="Channel" units="us" type="int16" elements="8"/>
|
||||
<access gcs="readonly" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="onchange" period="1000"/>
|
||||
<logging updatemode="manual" period="0"/>
|
||||
</object>
|
||||
</xml>
|
Loading…
x
Reference in New Issue
Block a user