Add command queue dispatcher and VERSION UART handler.

Centralize command dispatch over a FreeRTOS queue so UART and future
ESP-NOW transports can register handlers; implement the protobuf VERSION
command with framed nanopb responses including build git hash.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-18 21:46:51 +02:00
co-authored by Cursor
parent 6b7ccb4256
commit 43a85ce697
12 changed files with 422 additions and 12 deletions
+26 -2
View File
@@ -1,2 +1,26 @@
idf_component_register(SRCS "powerpod.c" "led_ring.c" "uart.c"
INCLUDE_DIRS ".")
execute_process(
COMMAND git -C ${CMAKE_CURRENT_LIST_DIR}/.. rev-parse --short=8 HEAD
OUTPUT_VARIABLE POWERPOD_GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT POWERPOD_GIT_HASH)
set(POWERPOD_GIT_HASH "unknown")
endif()
idf_component_register(
SRCS
"powerpod.c"
"led_ring.c"
"uart.c"
"uart_proto.c"
"cmd_handler.c"
"cmd_version.c"
"proto/uart_messages.pb.c"
"proto/pb_encode.c"
"proto/pb_common.c"
INCLUDE_DIRS
"."
"proto")
target_compile_definitions(${COMPONENT_LIB}
PRIVATE "POWERPOD_GIT_HASH=\"${POWERPOD_GIT_HASH}\"")