mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 14:24:21 +08:00
serial_test: fix first write_count_value for next write
This commit is contained in:
@@ -598,7 +598,14 @@ static void process_write_data(struct g_mod_t *g_mod, struct cli_args_t *g_cl)
|
||||
count += c;
|
||||
|
||||
if (c <= g_mod->_write_size) {
|
||||
g_mod->_write_count_value = g_mod->_write_data[c];
|
||||
|
||||
if (c == 0) {
|
||||
g_mod->_write_count_value = g_mod->_write_data[0];
|
||||
|
||||
} else {
|
||||
g_mod->_write_count_value = next_count_value(g_mod->_write_data[c - 1], g_cl->_ascii_range);
|
||||
}
|
||||
|
||||
repeat = 0;
|
||||
}
|
||||
} while (repeat);
|
||||
|
||||
Reference in New Issue
Block a user