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:
+26
-2
@@ -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}\"")
|
||||
|
||||
Reference in New Issue
Block a user