Skip to content

Commit 1627eb3

Browse files
committed
LP-548 Adds OPLInkRcvr to several more FCs, uncrustify, and fixes a few comments.
1 parent 9356ac9 commit 1627eb3

9 files changed

Lines changed: 13 additions & 16 deletions

File tree

flight/modules/RadioComBridge/RadioComBridge.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,8 @@ static void ProcessRadioStream(UAVTalkConnection inConnectionHandle, UAVTalkConn
611611
case OPLINKRECEIVER_OBJID:
612612
case MetaObjectId(OPLINKRECEIVER_OBJID):
613613
// Receive object locally
614-
// These objects are received by the modem and are not transmitted to the telemetry port
615-
// - OPLINKRECEIVER_OBJID : not sure why
616-
// some objects will send back a response to the remote modem
617614
UAVTalkReceiveObject(inConnectionHandle, true);
618-
// all other packets are relayed to the telemetry port
615+
// Also send the packet to the telemetry point.
619616
UAVTalkRelayPacket(inConnectionHandle, outConnectionHandle);
620617
break;
621618
default:

flight/pios/common/pios_oplinkrcvr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static void PIOS_oplinkrcvr_ppm_callback(uint32_t oplinkrcvr_id, const int16_t *
8181
for (uint8_t i = 0; i < OPLINKRECEIVER_CHANNEL_NUMELEM; ++i) {
8282
oplinkrcvr_dev->oplinkreceiverdata.Channel[i] = (i < RFM22B_PPM_NUM_CHANNELS) ? channels[i] : PIOS_RCVR_TIMEOUT;
8383
}
84-
84+
8585
// Update the RSSI and quality fields.
8686
int8_t rssi;
8787
OPLinkReceiverRSSIGet(&rssi);
@@ -91,7 +91,7 @@ static void PIOS_oplinkrcvr_ppm_callback(uint32_t oplinkrcvr_id, const int16_t *
9191
// Link quality is 0-128, so scale it down to 0-100
9292
oplinkrcvr_dev->oplinkreceiverdata.LinkQuality = quality * 100 / 128;
9393

94-
//OPLinkReceiverSet(&oplinkrcvr_dev->oplinkreceiverdata);
94+
OPLinkReceiverSet(&oplinkrcvr_dev->oplinkreceiverdata);
9595

9696
oplinkrcvr_dev->Fresh = true;
9797
}
@@ -110,7 +110,7 @@ static struct pios_oplinkrcvr_dev *PIOS_oplinkrcvr_alloc(void)
110110
oplinkrcvr_dev->magic = PIOS_OPLINKRCVR_DEV_MAGIC;
111111
oplinkrcvr_dev->Fresh = false;
112112
oplinkrcvr_dev->supv_timer = 0;
113-
113+
114114
/* The update callback cannot receive the device pointer, so set it in a global */
115115
global_oplinkrcvr_dev = oplinkrcvr_dev;
116116

flight/pios/common/pios_rfm22b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ static enum pios_radio_event radio_txStart(struct pios_rfm22b_dev *radio_dev)
18691869
}
18701870
if (newlen) {
18711871
packet_data = true;
1872-
*(p + len) = radio_dev->last_stream_sent;
1872+
*(p + len) = radio_dev->last_stream_sent;
18731873
len += newlen + 1;
18741874
}
18751875
}

flight/targets/boards/coptercontrol/firmware/inc/pios_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
#define PIOS_INCLUDE_SRXL
108108
#define PIOS_INCLUDE_HOTT
109109
#define PIOS_INCLUDE_IBUS
110-
/* #define PIOS_INCLUDE_GCSRCVR */
111-
/* #define PIOS_INCLUDE_OPLINKRCVR */
110+
#define PIOS_INCLUDE_GCSRCVR
111+
#define PIOS_INCLUDE_OPLINKRCVR
112112

113113
/* PIOS abstract receiver interface */
114114
#define PIOS_INCLUDE_RCVR

flight/targets/boards/discoveryf4bare/firmware/inc/pios_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#define PIOS_INCLUDE_DSM
106106
#define PIOS_INCLUDE_SBUS
107107
#define PIOS_INCLUDE_GCSRCVR
108-
// #define PIOS_INCLUDE_OPLINKRCVR
108+
#define PIOS_INCLUDE_OPLINKRCVR
109109

110110
/* PIOS abstract receiver interface */
111111
#define PIOS_INCLUDE_RCVR

flight/targets/boards/nucleof303re/firmware/inc/pios_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
#define PIOS_INCLUDE_SRXL
110110
#define PIOS_INCLUDE_HOTT
111111
#define PIOS_INCLUDE_IBUS
112-
/* #define PIOS_INCLUDE_GCSRCVR */
113-
/* #define PIOS_INCLUDE_OPLINKRCVR */
112+
#define PIOS_INCLUDE_GCSRCVR
113+
#define PIOS_INCLUDE_OPLINKRCVR
114114

115115
/* PIOS abstract receiver interface */
116116
#define PIOS_INCLUDE_RCVR

flight/targets/boards/revonano/firmware/inc/pios_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
#define PIOS_INCLUDE_EXBUS
114114
#define PIOS_INCLUDE_IBUS
115115
#define PIOS_INCLUDE_GCSRCVR
116-
// #define PIOS_INCLUDE_OPLINKRCVR
116+
#define PIOS_INCLUDE_OPLINKRCVR
117117

118118
/* PIOS abstract receiver interface */
119119
#define PIOS_INCLUDE_RCVR

flight/targets/boards/revoproto/firmware/inc/pios_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
#define PIOS_INCLUDE_DSM
101101
#define PIOS_INCLUDE_SBUS
102102
#define PIOS_INCLUDE_GCSRCVR
103-
/* #define PIOS_INCLUDE_OPLINKRCVR */
103+
#define PIOS_INCLUDE_OPLINKRCVR
104104

105105
/* PIOS abstract receiver interface */
106106
#define PIOS_INCLUDE_RCVR

python/examples/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def setup(self, port):
5656
_port = int(port[3:]) - 1
5757
else:
5858
_port = port
59-
serPort = serial.Serial(port, 115200, timeout=.5)
59+
serPort = serial.Serial(port, 57600, timeout=.5)
6060
if not serPort.isOpen():
6161
raise IOError("Failed to open serial port")
6262

0 commit comments

Comments
 (0)