feat: 增加 vofa 打印到上位机功能
This commit is contained in:
10
app/main.c
10
app/main.c
@@ -30,11 +30,15 @@
|
||||
#include "jj_blueteeth.h"
|
||||
|
||||
#include "by_imu.h"
|
||||
#include "by_vofa.h"
|
||||
#include "by_buzzer.h"
|
||||
#include "by_frame.h"
|
||||
#include "by_rt_button.h"
|
||||
#include "by_fan_control.h"
|
||||
|
||||
by_vofa_t vofa_test;
|
||||
float debug_array[2];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
TYPE_UNION test_data[2];
|
||||
@@ -58,9 +62,13 @@ int main(void)
|
||||
|
||||
pit_ms_init(TIM1_PIT, 1); // 运动解算,编码器
|
||||
|
||||
printf("ok\r\n");
|
||||
// printf("ok\r\n");
|
||||
by_vofa_init(&vofa_test, BT_UART_INDEX, sizeof(debug_array) / sizeof(debug_array[0]), debug_array);
|
||||
|
||||
while (1) {
|
||||
debug_array[0] = in_pos;
|
||||
debug_array[1] = out_pos;
|
||||
by_vofa_send(&vofa_test); // 发送数据
|
||||
Page_Run();
|
||||
by_frame_parse(2, &test_data[0].u32);
|
||||
by_buzzer_run();
|
||||
|
||||
Reference in New Issue
Block a user