mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
LP-518 Allow Mavlink and MSP Rssi for OpenLRS and use OPLinkStatus.RSSI
This commit is contained in:
parent
598baec72f
commit
794c18233e
@ -43,7 +43,7 @@
|
||||
#include "gpspositionsensor.h"
|
||||
#include "manualcontrolcommand.h"
|
||||
#include "manualcontrolsettings.h"
|
||||
#include "oplinkreceiver.h"
|
||||
#include "oplinkstatus.h"
|
||||
#include "accessorydesired.h"
|
||||
#include "attitudestate.h"
|
||||
#include "airspeedstate.h"
|
||||
@ -479,9 +479,10 @@ static void msp_send_analog(struct msp_bridge *m)
|
||||
ManualControlSettingsChannelGroupsGet(&channelGroups);
|
||||
|
||||
#ifdef PIOS_INCLUDE_OPLINKRCVR
|
||||
if (channelGroups.Throttle == MANUALCONTROLSETTINGS_CHANNELGROUPS_OPLINK) {
|
||||
if ((channelGroups.Throttle == MANUALCONTROLSETTINGS_CHANNELGROUPS_OPLINK) ||
|
||||
(channelGroups.Throttle == MANUALCONTROLSETTINGS_CHANNELGROUPS_OPENLRS)) {
|
||||
int8_t rssi;
|
||||
OPLinkReceiverRSSIGet(&rssi);
|
||||
OPLinkStatusRSSIGet(&rssi);
|
||||
|
||||
// MSP values have no units, and OSD rssi display requires calibration anyway, so we will translate OPLINK_LOW_RSSI to OPLINK_HIGH_RSSI -> 0-1023
|
||||
if (rssi < OPLINK_LOW_RSSI) {
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "taskinfo.h"
|
||||
#include "mavlink.h"
|
||||
#include "hwsettings.h"
|
||||
#include "oplinkreceiver.h"
|
||||
#include "oplinkstatus.h"
|
||||
#include "receiverstatus.h"
|
||||
#include "manualcontrolsettings.h"
|
||||
|
||||
@ -248,9 +248,10 @@ static void mavlink_send_rc_channels()
|
||||
ManualControlSettingsChannelGroupsGet(&channelGroups);
|
||||
|
||||
#ifdef PIOS_INCLUDE_OPLINKRCVR
|
||||
if (channelGroups.Throttle == MANUALCONTROLSETTINGS_CHANNELGROUPS_OPLINK) {
|
||||
if ((channelGroups.Throttle == MANUALCONTROLSETTINGS_CHANNELGROUPS_OPLINK) ||
|
||||
(channelGroups.Throttle == MANUALCONTROLSETTINGS_CHANNELGROUPS_OPENLRS)) {
|
||||
int8_t rssi;
|
||||
OPLinkReceiverRSSIGet(&rssi);
|
||||
OPLinkStatusRSSIGet(&rssi);
|
||||
|
||||
if (rssi < OPLINK_LOW_RSSI) {
|
||||
rssi = OPLINK_LOW_RSSI;
|
||||
|
Loading…
x
Reference in New Issue
Block a user