Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions test_node/app/src/threads/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ bool rc_command_received(rc_data_t command) {
// atomic_set(&latest_rc_command, (atomic_t));
// send the command over the UART interface
// 'I' means idle
// order should (i think) be 1. [L/R] 2. [F/B] 3. [U/D]
// order should (i think) be 1. [U/D] 2. [L/R] 3. [F/B]

Comment thread
evinlodder marked this conversation as resolved.
uart_poll_out(uart_dev, command.rc_vert);

if(command.rc_horiz == 'F' || command.rc_horiz == 'B') {
uart_poll_out(uart_dev, 'I');
uart_poll_out(uart_dev, command.rc_horiz);
Expand All @@ -27,8 +30,6 @@ bool rc_command_received(rc_data_t command) {
uart_poll_out(uart_dev, 'I');
Comment thread
evinlodder marked this conversation as resolved.
}

uart_poll_out(uart_dev, command.rc_vert);

return true;
}

Expand All @@ -39,6 +40,11 @@ int rc_init(const struct device* dev) {
return -1;
}

// send an initial UP command to DUT to start in hover state
uart_poll_out(dev, 'U');
uart_poll_out(dev, 'I');
uart_poll_out(dev, 'I');

uart_dev = dev;
Comment thread
evinlodder marked this conversation as resolved.
return 0;
}
Loading