修改can

This commit is contained in:
2025-09-07 13:54:28 +08:00
parent bc898da6c2
commit 889f34ae12
7 changed files with 42 additions and 76 deletions

View File

@@ -213,6 +213,10 @@ devices:
dependencies:
bsp: ["uart"]
component: []
bsp_requirements:
- type: "uart"
var_name: "BSP_UART_VOFA" # 需要替换的变量名
description: "用于VOFA数据传输"
thread_signals: []
files:
header: "vofa.h"

View File

@@ -18,7 +18,7 @@
/* Exported functions ------------------------------------------------------- */
float MOTOR_GetRotorAbsAngle(const MOTOR_t *motor) {
if (motor == NULL) return DEVICE_ERR_NULL;
motor->feedback.rotor_abs_angle;
return motor->feedback.rotor_abs_angle;
}
float MOTOR_GetRotorSpeed(const MOTOR_t *motor) {

View File

@@ -6,7 +6,7 @@ extern "C" {
/* Includes ----------------------------------------------------------------- */
#include "bsp/uart.h"
#include device/device.h
#include "device/device.h"
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */