diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-25 12:09:15 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-25 12:09:15 +0200 |
commit | 18e5d93da8fdf6dd97c9e2d090ae2648d85cb851 (patch) | |
tree | ec4935b8682ab878ecbe0c41afa96cacf9b5f53c /client | |
parent | 208dee5a3cf9eea84c5e26ef5cfe3abdd2e2a2f8 (diff) |
fix client show all messages
Diffstat (limited to 'client')
-rw-r--r-- | client/i2c.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/client/i2c.cpp b/client/i2c.cpp index 2a5e67a..c8b2dc8 100644 --- a/client/i2c.cpp +++ b/client/i2c.cpp @@ -9,8 +9,6 @@ #include "pb.h" #include "pb-types.h" -// #include "pb/mod/main.h" - bool i2c_dump_send = true; bool i2c_dump_recv = true; @@ -34,8 +32,6 @@ void i2c_send(uint16_t addr, const char * data, size_t data_size) { free(packed); } -static void i2c_handle_cmd_read(uint16_t, const char *, size_t); - void i2c_recv(const char * data, size_t data_size) { if (i2c_dump_recv) { _rl_printf_start(); @@ -45,17 +41,3 @@ void i2c_recv(const char * data, size_t data_size) { } } -// static void i2c_handle_cmd_read(uint16_t i2c_addr, const char * buf, size_t sz) { -// if (sz < 2) return; // require data address + 1 byte of data -// pb_cmd_read_t * cmd = (pb_cmd_read_t *) buf; -// sz--; // sz now represents size of cmd->data -// -// if (i2c_addr == BUSADDR_MAIN && cmd->address == 0x01) { -// if (sz % 2 != 0) return; // invalid data -// for (size_t offset = 0; offset < sz; offset += sizeof(pb_mod_main_mod_t)) { -// pb_mod_main_mod_t * mod = (pb_mod_main_mod_t *) (cmd->data + offset); -// printf("module at addr 0x%02x with state %d\n", mod->addr, mod->state); -// } -// } -// } - |