diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-02 19:14:08 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-02 19:14:08 +0200 |
commit | 595763efb64ee861f3ccf458ff35992b94f2fa3a (patch) | |
tree | 428ae0f7b474b8cb644fadcb4491ed7d8e4baffa /client/ui_dirc.c | |
parent | 14779cb187dac9ed4a0b6e7645e76e78587ad024 (diff) |
[WIP] stop on connection lost in dirc
Diffstat (limited to 'client/ui_dirc.c')
-rw-r--r-- | client/ui_dirc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/ui_dirc.c b/client/ui_dirc.c index 675913a..ed69cd2 100644 --- a/client/ui_dirc.c +++ b/client/ui_dirc.c @@ -81,7 +81,9 @@ void w2_ui_dirc_paint(int left, int right) { "\n" " <q> <w> <e> forward\n" " <a> <s> <d> backward\n" - "left both right\n"); + "left both right\n" + "\n" + "<space> send dirc mode command"); } void w2_ui_dirc(bool first) { @@ -96,6 +98,7 @@ void w2_ui_dirc(bool first) { if (ch == 'd' || ch == 's') lb++; if (ch == 'q' || ch == 'w') rf++; if (ch == 'a' || ch == 's') rb++; + if (ch == ' ') w2_send_mode(W2_M_DIRC); } int drive_l = w2_dirc_motor_l(lf, lb); @@ -104,6 +107,6 @@ void w2_ui_dirc(bool first) { drive_l += drive_r * W2_DIRC_STP; drive_r += drive_l * W2_DIRC_STP; - // w2_send_dirc(drive_l, drive_r); + w2_send_dirc(drive_l, drive_r); w2_ui_dirc_paint(drive_l, drive_r); } |