From c8af3feee6b35e33ab989ca8af0b48d738d4aedf Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 24 May 2018 13:07:43 -0400 Subject: command: Add a command_encode_and_frame() helper Add a helper function that calls command_encodef() followed by command_add_frame(). Signed-off-by: Kevin O'Connor --- src/linux/console.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/linux') diff --git a/src/linux/console.c b/src/linux/console.c index a1086942..9064171f 100644 --- a/src/linux/console.c +++ b/src/linux/console.c @@ -176,8 +176,7 @@ console_sendf(const struct command_encoder *ce, va_list args) { // Generate message uint8_t buf[MESSAGE_MAX]; - uint_fast8_t msglen = command_encodef(buf, ce, args); - command_add_frame(buf, msglen); + uint_fast8_t msglen = command_encode_and_frame(buf, ce, args); // Transmit message int ret = write(main_pfd[MP_TTY_IDX].fd, buf, msglen); -- cgit v1.2.3-70-g09d2