feat(motor_state): 支持多通道电机状态管理并添加推送周期动态调节功能

- 实现 node×channel 双键槽位管理,支持同一节点号在不同CAN通道独立缓存
- 扩展电机状态表容量从9个槽位到27个槽位(9节点×3通道)
- 添加SPI命令子命令0xFE用于动态设置0xC5推送周期(50-5000ms)
- 增加运行时可调推送周期功能,默认250ms,支持50ms-5s范围调节
- 更新CAN通道配置,启用CH1和CH2通道支持
- 版本号更新至1.5.4
This commit is contained in:
cbb
2026-07-30 02:11:49 +08:00
parent 46ef19d882
commit e06f5eb9a9
8 changed files with 107 additions and 34 deletions
+4 -1
View File
@@ -46,8 +46,11 @@ struct task_scheduler_t {
volatile uint16_t div_can_tx;
/** @brief 调度分频计数:心跳(1s)。 */
volatile uint16_t div_heartbeat;
/** @brief 调度分频计数:多电机状态推送(250ms)。 */
/** @brief 调度分频计数:多电机状态推送(默认 250ms)。 */
volatile uint16_t div_motor_state;
/** @brief 0xC5 推送周期(100us tick 数,运行时可由 ESP32 SPI 命令调整)。
* 默认 CONFIG_TASK_PERIOD_MOTOR_STATE_TICKS,范围 500(50ms)~50000(5000ms)。 */
volatile uint16_t motor_state_period_ticks;
/** @brief 调度分频计数:APP 状态/诊断打印(5s)。 */
volatile uint16_t div_diag_print;
};