feat: 增加通信参数
This commit is contained in:
13
app/main.c
13
app/main.c
@@ -36,12 +36,9 @@
|
||||
#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];
|
||||
TYPE_UNION test_data[BY_FRAME_DATA_NUM];
|
||||
clock_init(SYSTEM_CLOCK_120M);
|
||||
system_delay_init();
|
||||
debug_init();
|
||||
@@ -63,15 +60,11 @@ int main(void)
|
||||
pit_ms_init(TIM1_PIT, 1); // 运动解算,编码器
|
||||
|
||||
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); // 发送数据
|
||||
printf("pwm:%lu,%lu,%lu,%lu\r\n", pwm_duty_ls_g, pwm_duty_rs_g, pwm_duty_lb_g, pwm_duty_rb_g);
|
||||
// printf("pwm:%lu,%lu,%lu,%lu\r\n", pwm_duty_ls_g, pwm_duty_rs_g, pwm_duty_lb_g, pwm_duty_rb_g);
|
||||
Page_Run();
|
||||
by_frame_parse(2, &test_data[0].u32);
|
||||
by_frame_parse(&test_data[0].u32);
|
||||
by_buzzer_run();
|
||||
jj_bt_run();
|
||||
in_pos = test_data[1].f32;
|
||||
|
||||
Reference in New Issue
Block a user