2025-10-14 00:49:58 +08:00
|
|
|
#include "adc.h"
|
|
|
|
|
#include <cstdio>
|
|
|
|
|
|
|
|
|
|
constexpr int status_print = 0;
|
2025-10-19 23:20:28 +08:00
|
|
|
extern sampler sampler;
|
2025-10-14 00:49:58 +08:00
|
|
|
void test_1111() {
|
|
|
|
|
// 初始化CAN回环测试
|
|
|
|
|
// can_loopback_init();
|
|
|
|
|
// can_config();
|
|
|
|
|
if (status_print) {
|
|
|
|
|
/* value print */
|
|
|
|
|
printf(" the temperature data is %2.2f degrees Celsius\r\n",
|
2025-11-01 20:29:11 +08:00
|
|
|
sampler.get_mcu_temp());
|
2025-10-14 00:49:58 +08:00
|
|
|
printf(" the drv_temperature data is %2.2f degrees Celsius\r\n",
|
2025-10-19 23:20:28 +08:00
|
|
|
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());
|
2025-10-14 00:49:58 +08:00
|
|
|
// printf(" the angle is %2.2f\r\n", tle5012b_read());
|
|
|
|
|
|
|
|
|
|
printf("\n----------------------------------------------------\n");
|
|
|
|
|
}
|
|
|
|
|
// can_loopback_test();
|
|
|
|
|
}
|