Skip to content

Commit 27694e0

Browse files
committed
mavproxy_rc: write sitl_output to current link
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
1 parent bf13137 commit 27694e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MAVProxy/modules/mavproxy_rc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, mpstate):
3030
self.add_command('switch', self.cmd_switch, "flight mode switch control", ['<0|1|2|3|4|5|6>'])
3131
self.rc_settings = mp_settings.MPSettings(
3232
[('override_hz', float, 10.0)])
33-
if self.sitl_output:
33+
if self.sitl_outputs:
3434
self.rc_settings.override_hz = 20.0
3535
self.add_completion_function('(RCSETTING)',
3636
self.rc_settings.completion)
@@ -112,10 +112,10 @@ def mavlink_packet(self, m):
112112

113113
def send_rc(self):
114114
'''send RC override packet'''
115-
if self.sitl_output:
115+
if self.sitl_outputs:
116116
chan16 = self.override[:16]
117117
buf = struct.pack('<HHHHHHHHHHHHHHHH', *chan16)
118-
self.sitl_output.write(buf)
118+
self.sitl_outputs[self.master.linknum].write(buf)
119119
else:
120120
chan18 = self.override[:18]
121121
self.master.mav.rc_channels_override_send(self.target_system,

0 commit comments

Comments
 (0)