summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-01 10:04:46 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-01 10:04:46 +0200
commite5eeab9dc97c37be905bd616f38e83488dbe2136 (patch)
treeda65e16c652b0c72f5c2189a1fe3914ab693f906 /client
parent35cdecc0134b82d69b120533b091b8e5b58415e1 (diff)
`make format`
Diffstat (limited to 'client')
-rw-r--r--client/commands.c12
-rw-r--r--client/ui.c6
-rw-r--r--client/ui_dirc.c6
3 files changed, 11 insertions, 13 deletions
diff --git a/client/commands.c b/client/commands.c
index 0d47fcd..18373f6 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include "../shared/bin.h"
-#include "../shared/protocol.h"
#include "../shared/modes.h"
+#include "../shared/protocol.h"
#include "commands.h"
#include "main.h"
#include "time.h"
@@ -19,7 +19,7 @@ w2_s_bin *w2_send_mode(w2_e_mode mode) {
W2_CREATE_MSG_BIN(w2_s_cmd_mode_rx, msg, msg_bin);
msg->opcode = W2_CMD_MODE | W2_CMDDIR_RX;
- msg->mode = mode;
+ msg->mode = mode;
w2_send_bin(msg_bin);
free(msg_bin);
@@ -29,8 +29,8 @@ w2_s_bin *w2_send_mode(w2_e_mode mode) {
w2_s_bin *w2_send_dirc(uint16_t left, uint16_t right) {
W2_CREATE_MSG_BIN(w2_s_cmd_dirc_rx, msg, msg_bin);
msg->opcode = W2_CMD_DIRC | W2_CMDDIR_RX;
- msg->left = w2_bin_hton16(left);
- msg->right = w2_bin_hton16(right);
+ msg->left = w2_bin_hton16(left);
+ msg->right = w2_bin_hton16(right);
w2_send_bin(msg_bin);
free(msg_bin);
return NULL;
@@ -46,8 +46,8 @@ w2_s_bin *w2_send_info() {
w2_s_bin *w2_send_ping() {
W2_CREATE_MSG_BIN(w2_s_cmd_ping_rx, msg, msg_bin);
- msg->opcode = W2_CMD_PING | W2_CMDDIR_RX;
- msg->id = g_w2_state.ping_id;
+ msg->opcode = W2_CMD_PING | W2_CMDDIR_RX;
+ msg->id = g_w2_state.ping_id;
w2_send_bin(msg_bin);
free(msg_bin);
diff --git a/client/ui.c b/client/ui.c
index 26e2116..e6e73f0 100644
--- a/client/ui.c
+++ b/client/ui.c
@@ -11,10 +11,10 @@
#include "ui.h"
WINDOW *g_w2_ui_win;
-unsigned int g_w2_ui_width = 0;
-unsigned int g_w2_ui_height = 0;
+unsigned int g_w2_ui_width = 0;
+unsigned int g_w2_ui_height = 0;
void (*g_w2_ui_current_tab)(bool first) = &w2_ui_dirc;
-void (*g_w2_ui_last_tab)(bool first) = NULL;
+void (*g_w2_ui_last_tab)(bool first) = NULL;
void w2_ui_main() {
g_w2_ui_width = getmaxx(g_w2_ui_win);
diff --git a/client/ui_dirc.c b/client/ui_dirc.c
index 13b2d10..dcd4423 100644
--- a/client/ui_dirc.c
+++ b/client/ui_dirc.c
@@ -1,5 +1,5 @@
-#include "../shared/util.h"
#include "../shared/protocol.h"
+#include "../shared/util.h"
#include "commands.h"
#include "ui.h"
@@ -47,9 +47,7 @@ int w2_avg(int *samples, unsigned int sample_count) {
W2_DIRC_MOTOR_DRIVER(l);
W2_DIRC_MOTOR_DRIVER(r);
-void w2_ui_dirc_init() {
- w2_send_mode(W2_M_DIRC);
-}
+void w2_ui_dirc_init() { w2_send_mode(W2_M_DIRC); }
void w2_ui_dirc(bool first) {
if (first) w2_ui_dirc_init();