feat(FOC): 优化开环速度控制逻辑并提升性能
refactor(ADC): 重构采样逻辑并封装为 sampler 类 refactor(CAN): 更新 CAN 发送器以使用新的sampler 接口 refactor(timer): 调整定时器中断结构并优化任务调度
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include <cstdio>
|
||||
|
||||
constexpr int status_print = 0;
|
||||
|
||||
extern sampler sampler;
|
||||
void test_1111() {
|
||||
// 初始化CAN回环测试
|
||||
// can_loopback_init();
|
||||
@@ -21,13 +21,13 @@ void test_1111() {
|
||||
if (status_print) {
|
||||
/* value print */
|
||||
printf(" the temperature data is %2.2f degrees Celsius\r\n",
|
||||
get_mcu_temp());
|
||||
sampler.get_mcu_temp());
|
||||
printf(" the drv_temperature data is %2.2f degrees Celsius\r\n",
|
||||
get_drv_temp());
|
||||
printf(" the U current data is %2.2f mA\r\n", get_current('U'));
|
||||
printf(" the V current data is %2.2f mA\r\n", get_current('V'));
|
||||
printf(" the W current data is %2.2f mA\r\n", get_current('W'));
|
||||
printf(" the VBUS is %2.2f V\r\n", get_vbus_voltage());
|
||||
sampler.get_drv_temp());
|
||||
printf(" the U current data is %2.2f mA\r\n", sampler.get_current('U'));
|
||||
printf(" the V current data is %2.2f mA\r\n", sampler.get_current('V'));
|
||||
printf(" the W current data is %2.2f mA\r\n", sampler.get_current('W'));
|
||||
printf(" the VBUS is %2.2f V\r\n", sampler.get_vbus_voltage());
|
||||
// printf(" the angle is %2.2f\r\n", tle5012b_read());
|
||||
|
||||
printf("\n----------------------------------------------------\n");
|
||||
|
||||
Reference in New Issue
Block a user