aboutsummaryrefslogtreecommitdiff
path: root/client/ui_dirc.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-06 19:48:09 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-06 19:48:09 +0200
commitae8beb20a2a837824cfda4d748fbe07b26a161f0 (patch)
treea7c2bf5fc6cbddc1ae62107050dcc6aa793cc7ae /client/ui_dirc.c
parent8c1d31ef16745cee07059788386cd88c718092ac (diff)
tab bar working
Diffstat (limited to 'client/ui_dirc.c')
-rw-r--r--client/ui_dirc.c15
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);