Browse Source

Plane: use setup_uart()

master
Andrew Tridgell 11 years ago
parent
commit
bd09d8551d
  1. 10
      ArduPlane/system.pde

10
ArduPlane/system.pde

@ -116,16 +116,10 @@ static void init_ardupilot() @@ -116,16 +116,10 @@ static void init_ardupilot()
check_usb_mux();
// we have a 2nd serial port for telemetry
hal.uartC->begin(map_baudrate(g.serial1_baud, SERIAL1_BAUD),
128, SERIAL1_BUFSIZE);
gcs[1].init(hal.uartC);
gcs[1].setup_uart(hal.uartC, map_baudrate(g.serial1_baud, SERIAL1_BAUD), 128, SERIAL1_BUFSIZE);
#if MAVLINK_COMM_NUM_BUFFERS > 2
if (hal.uartD != NULL) {
hal.uartD->begin(map_baudrate(g.serial2_baud, SERIAL2_BAUD),
128, SERIAL2_BUFSIZE);
gcs[2].init(hal.uartD);
}
gcs[2].setup_uart(hal.uartD, map_baudrate(g.serial2_baud, SERIAL2_BAUD), 128, SERIAL2_BUFSIZE);
#endif
mavlink_system.sysid = g.sysid_this_mav;

Loading…
Cancel
Save