feat: 换用更简单的通信帧格式
This commit is contained in:
26
app/main.c
26
app/main.c
@@ -31,12 +31,14 @@
|
||||
|
||||
#include "by_imu.h"
|
||||
#include "by_buzzer.h"
|
||||
#include "by_tiny_frame.h"
|
||||
#include "by_frame.h"
|
||||
#include "by_rt_button.h"
|
||||
#include "by_fan_control.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
TYPE_UNION test_data;
|
||||
TYPE_UNION test_data_last;
|
||||
clock_init(SYSTEM_CLOCK_120M);
|
||||
system_delay_init();
|
||||
debug_init();
|
||||
@@ -50,8 +52,8 @@ int main(void)
|
||||
by_rb_init();
|
||||
by_pwm_init();
|
||||
// by_buzzer_init();
|
||||
|
||||
by_tiny_frame_init();
|
||||
by_frame_init();
|
||||
|
||||
Page_Init();
|
||||
sport_pid_init();
|
||||
|
||||
@@ -59,11 +61,19 @@ int main(void)
|
||||
pit_ms_init(TIM1_PIT, 1); // 运动解算,bianmaqi
|
||||
|
||||
printf("ok\r\n");
|
||||
|
||||
|
||||
while (1) {
|
||||
Page_Run();
|
||||
//by_buzzer_run();
|
||||
jj_bt_run();
|
||||
by_tiny_frame_run();
|
||||
// Page_Run();
|
||||
by_frame_parse(1, &test_data.u32);
|
||||
|
||||
if (test_data.u32 != test_data_last.u32) {
|
||||
ips200_show_float(0, 50, test_data.f32, 4, 2);
|
||||
// printf("- %ld\r\n", (uint32_t)(test_data.f32 * 100));
|
||||
}
|
||||
|
||||
test_data_last.u32 = test_data.u32;
|
||||
|
||||
// by_buzzer_run();
|
||||
// jj_bt_run();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user