summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-23 12:56:37 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-23 12:56:37 +0200
commit33540c7855d52343eb943d3a5144d6b736c234da (patch)
tree82be02442e10b6d72a0aac3cc1b239eb17b6e76f
parent2c94e4478558551dbebdc8fa8682661fa60a1c75 (diff)
make format
-rw-r--r--robot/sercomm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/robot/sercomm.c b/robot/sercomm.c
index 59b0f5a..723a231 100644
--- a/robot/sercomm.c
+++ b/robot/sercomm.c
@@ -16,7 +16,7 @@ void w2_sercomm_main() {
#endif
// send data
while (g_w2_sercomm_offset != g_w2_sercomm_index) {
- w2_s_bin *data = g_w2_sercomm_buffer[g_w2_sercomm_offset];
+ w2_s_bin *data = g_w2_sercomm_buffer[g_w2_sercomm_offset];
char *data_cast = malloc(data->bytes);
memcpy(data_cast, data->data, data->bytes);
serial_send(data_cast, data->bytes);
@@ -33,7 +33,7 @@ void w2_sercomm_append_msg(w2_s_bin *data) {
free(g_w2_sercomm_buffer[g_w2_sercomm_index]);
w2_s_bin *data_copy = malloc(sizeof(w2_s_bin) + sizeof(uint8_t) * data->bytes);
memcpy(&data_copy->data, data->data, data->bytes);
- data_copy->bytes = data->bytes;
+ data_copy->bytes = data->bytes;
g_w2_sercomm_buffer[g_w2_sercomm_index] = data_copy;
if (g_w2_sercomm_buffer_full) return;
g_w2_sercomm_index = next_index;