#include "adc.h" #include "config.h" #include // TEST 调试宏定义 #if TEST_DEBUG #define TEST_DEBUG_PRINT(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define TEST_DEBUG_PRINT(fmt, ...) ((void)0) #endif constexpr int status_print = 0; extern sampler sampler; void test_1111() { // 初始化 CAN 回环测试 // can_loopback_init(); // can_config(); if (status_print) { /* value print */ TEST_DEBUG_PRINT(" the temperature data is %2.2f degrees Celsius\r\n", sampler.get_mcu_temp()); TEST_DEBUG_PRINT(" the drv_temperature data is %2.2f degrees Celsius\r\n", sampler.get_drv_temp()); TEST_DEBUG_PRINT(" the U current data is %2.2f mA\r\n", sampler.get_current('U')); TEST_DEBUG_PRINT(" the V current data is %2.2f mA\r\n", sampler.get_current('V')); TEST_DEBUG_PRINT(" the W current data is %2.2f mA\r\n", sampler.get_current('W')); TEST_DEBUG_PRINT(" the VBUS is %2.2f V\r\n", sampler.get_vbus_voltage()); // TEST_DEBUG_PRINT(" the angle is %2.2f\r\n", tle5012b_read()); TEST_DEBUG_PRINT("\n----------------------------------------------------\n"); } // can_loopback_test(); }