chore(rmcs_board): Raise UART0 baudrate for temporary debugging#55
chore(rmcs_board): Raise UART0 baudrate for temporary debugging#55qzhhhi wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough将 UART0 的初始化波特率从 115200 更新为 921600,并同步更新 STM32 CubeMX 配置和生成的 USART6 HAL 初始化代码以匹配该速率。 ChangesUART 波特率同步修改
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
在需要使用该固件的板上开启 dangerously_skip_version_check。 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@firmware/rmcs_board/app/src/uart/uart.hpp`:
- Line 143: Uart::Lazy is currently hardcoded with 921600 for
data::DataId::kUart0 (kBoardConfigs[0]) which is a temporary debug baud and
breaks existing tools; change the default back to 115200 and make the baud
configurable via a centralized constant or macro (e.g. UART_DEFAULT_BAUD or
BOARD_UART_BAUD) so the Uart::Lazy initializer uses that symbol instead of the
magic literal 921600, and update any related docs or config header where board
serial defaults are defined.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8f864a0b-50f9-4120-8ef9-fbc63d6c5311
📒 Files selected for processing (1)
firmware/rmcs_board/app/src/uart/uart.hpp
|
|
||
| inline constinit Uart::Lazy uart_array[]{ | ||
| Uart::Lazy{data::DataId::kUart0, kBoardConfigs[0], 115200, parity_none}, | ||
| Uart::Lazy{data::DataId::kUart0, kBoardConfigs[0], 921600, parity_none}, |
There was a problem hiding this comment.
避免把“临时调试”波特率直接固化为主线默认值
Line 143 将 UART0 默认波特率改为 921600,会直接改变既有串口工具/上位机(若仍按 115200)的连通性契约。既然这是临时调试用途,建议改为可切换配置(宏或集中常量),主线默认保持 115200。
💡 建议改法(示例)
+constexpr uint32_t kUart0Baudrate =
+#ifdef RMCS_UART0_DEBUG_BAUD_921600
+ 921600;
+#else
+ 115200;
+#endif
+
inline constinit Uart::Lazy uart_array[]{
- Uart::Lazy{data::DataId::kUart0, kBoardConfigs[0], 921600, parity_none},
+ Uart::Lazy{data::DataId::kUart0, kBoardConfigs[0], kUart0Baudrate, parity_none},
Uart::Lazy{data::DataId::kUart1, kBoardConfigs[1], 115200, parity_none},🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@firmware/rmcs_board/app/src/uart/uart.hpp` at line 143, Uart::Lazy is
currently hardcoded with 921600 for data::DataId::kUart0 (kBoardConfigs[0])
which is a temporary debug baud and breaks existing tools; change the default
back to 115200 and make the baud configurable via a centralized constant or
macro (e.g. UART_DEFAULT_BAUD or BOARD_UART_BAUD) so the Uart::Lazy initializer
uses that symbol instead of the magic literal 921600, and update any related
docs or config header where board serial defaults are defined.
摘要
本 PR 临时将串口波特率提高到 921600 bps 以便调试;实际改动同时包含对 RMCS 控制板上的 UART0(软件层)和 C_Board 上的 USART6(硬件 HAL)波特率的修改。注意:PR 标题和 commit 信息存在不一致——PR 标题/分支名指向 UART0,但 commit 信息提到 UART1(USART6)。
修改内容摘要
影响与注意事项
变更范围