HAL_PX4: fixed build warning

This commit is contained in:
Andrew Tridgell 2015-01-06 08:36:28 +11:00
parent d34e5b3f42
commit 464714f1ab

View File

@ -155,7 +155,7 @@ void PX4UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS)
} }
void PX4UARTDriver::set_flow_control(enum flow_control flow_control) void PX4UARTDriver::set_flow_control(enum flow_control fcontrol)
{ {
if (_fd == -1) { if (_fd == -1) {
return; return;
@ -163,13 +163,13 @@ void PX4UARTDriver::set_flow_control(enum flow_control flow_control)
struct termios t; struct termios t;
tcgetattr(_fd, &t); tcgetattr(_fd, &t);
// we already enabled CRTS_IFLOW above, just enable output flow control // we already enabled CRTS_IFLOW above, just enable output flow control
if (flow_control != FLOW_CONTROL_DISABLE) { if (fcontrol != FLOW_CONTROL_DISABLE) {
t.c_cflag |= CRTSCTS; t.c_cflag |= CRTSCTS;
} else { } else {
t.c_cflag &= ~CRTSCTS; t.c_cflag &= ~CRTSCTS;
} }
tcsetattr(_fd, TCSANOW, &t); tcsetattr(_fd, TCSANOW, &t);
_flow_control = flow_control; _flow_control = fcontrol;
} }
void PX4UARTDriver::begin(uint32_t b) void PX4UARTDriver::begin(uint32_t b)