diff options
Diffstat (limited to 'client/ui_dirc.c')
-rw-r--r-- | client/ui_dirc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/client/ui_dirc.c b/client/ui_dirc.c index d275ddf..d394f8d 100644 --- a/client/ui_dirc.c +++ b/client/ui_dirc.c @@ -94,11 +94,16 @@ void w2_ui_tab_dirc(bool first) { unsigned int rb = 0; unsigned int rf = 0; while ((ch = getch()) != -1) { - if (ch == 'e' || ch == 'w') lf++; - 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); + if (ch == 'e' || ch == 'w') + lf++; + else if (ch == 'd' || ch == 's') + lb++; + else if (ch == 'q' || ch == 'w') + rf++; + else if (ch == 'a' || ch == 's') + rb++; + else if (ch == ' ') + w2_send_mode(W2_M_DIRC); } int drive_l = w2_dirc_motor_l(lf, lb); |