From 1c7c0bd747c839fb1e449e98cec942894821addf Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 29 May 2022 17:01:19 +0200 Subject: `make format` --- client/commands.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'client/commands.c') diff --git a/client/commands.c b/client/commands.c index 67025f4..1ab79fb 100644 --- a/client/commands.c +++ b/client/commands.c @@ -1,10 +1,10 @@ #include -#include "commands.h" -#include "time.h" -#include "main.h" #include "../shared/bin.h" #include "../shared/protocol.h" +#include "commands.h" +#include "main.h" +#include "time.h" void w2_send_bin(w2_s_bin *data) { w2_serial_write("\xff", 1); @@ -14,27 +14,26 @@ void w2_send_bin(w2_s_bin *data) { } } -w2_s_bin* w2_send_info() { +w2_s_bin *w2_send_info() { size_t msg_size = sizeof(w2_s_cmd_info_rx); w2_s_cmd_info_rx *msg = malloc(msg_size); msg->opcode = W2_CMD_INFO | W2_CMDDIR_RX; - w2_s_bin *msg_bin = w2_bin_s_alloc(msg_size, (uint8_t *)msg); + w2_s_bin *msg_bin = w2_bin_s_alloc(msg_size, (uint8_t *)msg); w2_send_bin(msg_bin); free(msg); free(msg_bin); } -w2_s_bin* w2_send_ping() { - g_w2_state.ping_id = (uint8_t) rand(); +w2_s_bin *w2_send_ping() { + g_w2_state.ping_id = (uint8_t)rand(); size_t msg_size = sizeof(w2_s_cmd_ping_rx); w2_s_cmd_ping_rx *msg = malloc(msg_size); msg->opcode = W2_CMD_PING | W2_CMDDIR_RX; - msg->id = g_w2_state.ping_id; - w2_s_bin *msg_bin = w2_bin_s_alloc(msg_size, (uint8_t *)msg); + msg->id = g_w2_state.ping_id; + w2_s_bin *msg_bin = w2_bin_s_alloc(msg_size, (uint8_t *)msg); w2_send_bin(msg_bin); free(msg); free(msg_bin); w2_timer_start(W2_TIMER_PING); } - -- cgit v1.2.3