mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 06:03:34 +08:00
Ulanding: fix formatting issues
This commit is contained in:
@@ -210,6 +210,7 @@ Radar::init()
|
|||||||
#else
|
#else
|
||||||
ret = CDev::init();
|
ret = CDev::init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret != OK) {
|
if (ret != OK) {
|
||||||
PX4_WARN("vdev init failed");
|
PX4_WARN("vdev init failed");
|
||||||
break;
|
break;
|
||||||
@@ -232,38 +233,27 @@ Radar::init()
|
|||||||
/* fill the struct for the new configuration */
|
/* fill the struct for the new configuration */
|
||||||
tcgetattr(fd, &uart_config);
|
tcgetattr(fd, &uart_config);
|
||||||
|
|
||||||
// Input flags - Turn off input processing
|
/** Input flags - Turn off input processing
|
||||||
//
|
*
|
||||||
// convert break to null byte, no CR to NL translation,
|
* convert break to null byte, no CR to NL translation,
|
||||||
// no NL to CR translation, don't mark parity errors or breaks
|
* no NL to CR translation, don't mark parity errors or breaks
|
||||||
// no input parity check, don't strip high bit off,
|
* no input parity check, don't strip high bit off,
|
||||||
// no XON/XOFF software flow control
|
* no XON/XOFF software flow control
|
||||||
//
|
*
|
||||||
//TODO: only Posix/VDev/OcPoc?
|
*/
|
||||||
|
|
||||||
uart_config.c_iflag &= ~(IGNBRK | BRKINT | ICRNL |
|
uart_config.c_iflag &= ~(IGNBRK | BRKINT | ICRNL |
|
||||||
INLCR | PARMRK | INPCK | ISTRIP | IXON);
|
INLCR | PARMRK | INPCK | ISTRIP | IXON);
|
||||||
//
|
|
||||||
// No line processing
|
/** No line processing
|
||||||
//
|
*
|
||||||
// echo off, echo newline off, canonical mode off,
|
* echo off, echo newline off, canonical mode off,
|
||||||
// extended input processing off, signal chars off
|
* extended input processing off, signal chars off
|
||||||
//
|
*
|
||||||
//TODO: only for Posix/VDev/OcPoc?
|
*/
|
||||||
|
|
||||||
uart_config.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN | ISIG);
|
uart_config.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN | ISIG);
|
||||||
|
|
||||||
//
|
|
||||||
// Output flags - Turn off output processing
|
|
||||||
//
|
|
||||||
// no CR to NL translation, no NL to CR-NL translation,
|
|
||||||
// no NL to CR translation, no column 0 CR suppression,
|
|
||||||
// no Ctrl-D suppression, no fill characters, no case mapping,
|
|
||||||
// no local output processing
|
|
||||||
//
|
|
||||||
//// config.c_oflag &= ~(OCRNL | ONLCR | ONLRET |
|
|
||||||
// ONOCR | ONOEOT| OFILL | OLCUC | OPOST);
|
|
||||||
|
|
||||||
//uart_config.c_oflag = 0;
|
|
||||||
|
|
||||||
/* clear ONLCR flag (which appends a CR for every LF) */
|
/* clear ONLCR flag (which appends a CR for every LF) */
|
||||||
uart_config.c_oflag &= ~ONLCR;
|
uart_config.c_oflag &= ~ONLCR;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user