mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 03:33:34 +08:00
Mixer test: use real defines from IO firmware
We use the real defines now and test them against every mixer on the system. This means we should catch transfer errors now before even hitting master.
This commit is contained in:
committed by
Daniel Agar
parent
d401252c9e
commit
5247f17576
@@ -77,16 +77,17 @@ int test_uart_baudchange(int argc, char *argv[])
|
||||
|
||||
int ret;
|
||||
|
||||
#define UART_BAUDRATE_RUNTIME_CONF
|
||||
#ifdef UART_BAUDRATE_RUNTIME_CONF
|
||||
|
||||
if ((termios_state = tcgetattr(uart2, &uart2_config)) < 0) {
|
||||
printf("ERROR getting termios config for UART2: %d\n", termios_state);
|
||||
ret = termios_state;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
memcpy(&uart2_config_original, &uart2_config, sizeof(struct termios));
|
||||
if ((termios_state = tcgetattr(uart2, &uart2_config)) < 0) {
|
||||
printf("ERROR getting termios config for UART2: %d\n", termios_state);
|
||||
ret = termios_state;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Set baud rate */
|
||||
if (cfsetispeed(&uart2_config, B9600) < 0 || cfsetospeed(&uart2_config, B9600) < 0) {
|
||||
@@ -108,8 +109,6 @@ int test_uart_baudchange(int argc, char *argv[])
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
uint8_t sample_uart2[] = {'U', 'A', 'R', 'T', '2', ' ', '#', 0, '\n'};
|
||||
|
||||
int i, r;
|
||||
|
||||
Reference in New Issue
Block a user