feat: 完成eeprom及页面ui更新

This commit is contained in:
2024-03-02 16:00:05 +08:00
parent 54b14bc47c
commit a758d0f94f
16 changed files with 348 additions and 149 deletions

View File

@@ -52,65 +52,60 @@ int main(void)
clock_init(SYSTEM_CLOCK_144M);
system_delay_init();
debug_init();
// mt9v03x_init();
mt9v03x_init();
ips200_init(IPS200_TYPE_SPI);
by_led_init();
by_buzzer_init();
// by_buzzer_init();
by_button_init();
jj_bt_init();
jj_param_eeprom_init();
// jj_bt_init();
// jj_param_eeprom_init();
Page_Init();
// pit_ms_init(TIM6_PIT, 2);
// pit_ms_init(TIM1_PIT, 2);
pit_ms_init(TIM1_PIT, 1);
by_tiny_frame_init();
printf("start running\r\n");
/** 测试完成后移除 **/
// by_tiny_frame_parse_handle_register(test);
by_tiny_frame_parse_start_listern();
by_tf_pack_frame_t frame_now;
frame_now.cmd = 0x06;
frame_now.data = 0x19260817;
frame_now.reg_addr = 0x4059;
frame_now.reg_addr = 0x00;
frame_now.slave_id = 0x0D;
/** 测试完成后移除 **/
while (1) {
Page_Run();
by_buzzer_run();
// by_buzzer_run();
/** 测试完成后移除 **/
by_tiny_frame_run();
// by_tiny_frame_pack_send(&frame_now);
by_tiny_frame_pack_send(&frame_now);
system_delay_ms(10);
by_tiny_frame_parse_timer_handle();
/** 测试完成后移除 **/
// if (mt9v03x_finish_flag) {
// // 该操作消耗大概 1970 个 tick折合约 110us
// memcpy(mt9v03x_image_copy[0], mt9v03x_image[0], (sizeof(mt9v03x_image_copy) / sizeof(uint8_t)));
// // adaptiveThreshold((uint8_t*)mt9v03x_image_copy, (uint8_t*)mt9v03x_image_copy, 188, 120, 7, 17);
// // ips200_show_gray_image(0, 0, mt9v03x_image_copy[0], MT9V03X_W, MT9V03X_H, MT9V03X_W, MT9V03X_H, 0);
// mt9v03x_finish_flag = 0;
// by_led_info_blink();
// state_type = COMMON_STATE;
// img_processing();
// get_corners();
// aim_distance = COMMON_AIM;
// tracking();
// ElementJudge();
// ElementRun();
// MidLineTrack();
// }
if (mt9v03x_finish_flag) {
// 该操作消耗大概 1970 个 tick折合约 110us
memcpy(mt9v03x_image_copy[0], mt9v03x_image[0], (sizeof(mt9v03x_image_copy) / sizeof(uint8_t)));
// adaptiveThreshold((uint8_t*)mt9v03x_image_copy, (uint8_t*)mt9v03x_image_copy, 188, 120, 7, 17);
// ips200_show_gray_image(0, 0, mt9v03x_image_copy[0], MT9V03X_W, MT9V03X_H, MT9V03X_W, MT9V03X_H, 0);
mt9v03x_finish_flag = 0;
by_led_info_blink();
// state_type = COMMON_STATE;
// img_processing();
// get_corners();
// aim_distance = COMMON_AIM;
// tracking();
// ElementJudge();
// ElementRun();
// MidLineTrack();
}
}
}