chore: ESC debug cleanup (Issue #521) #528

Closed
sl-jetson wants to merge 0 commits from sl-android/issue-521-esc-debug-cleanup into main
Collaborator

Guard ESC debug output (hoverboard_backend_send printf, UART5 diagnostic) and R/X test commands behind #ifdef DEBUG_MOTOR_TEST. Make huart2 static in production builds. No functional change to production firmware.

Guard ESC debug output (hoverboard_backend_send printf, UART5 diagnostic) and R/X test commands behind #ifdef DEBUG_MOTOR_TEST. Make huart2 static in production builds. No functional change to production firmware.
sl-jetson added 1 commit 2026-03-06 23:07:44 -05:00
- esc_hoverboard.c: huart2 static in production; non-static only under
  #ifdef DEBUG_MOTOR_TEST (needed by R command in jetson_uart.c)
- esc_hoverboard.c: UART5 diagnostic in hoverboard_backend_init() and
  per-packet printf in hoverboard_backend_send() guarded by same flag
- esc_hoverboard.c: #include <stdio.h> also guarded (not needed in production)
- jetson_uart.c: R (baud sweep) and X (GPIO test) commands guarded by
  #ifdef DEBUG_MOTOR_TEST — not compiled into production firmware

Production build: no debug output, static huart2, no R/X commands.
Debug build: define DEBUG_MOTOR_TEST to re-enable all diagnostics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson closed this pull request 2026-03-07 09:20:17 -05:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#528
No description provided.