diff --git a/app/jj_param.c b/app/jj_param.c index d5fb726..727c609 100644 --- a/app/jj_param.c +++ b/app/jj_param.c @@ -10,6 +10,7 @@ soft_iic_info_struct eeprom_param; TYPE_UNION iic_buffer[DATA_IN_FLASH_NUM]; TYPE_UNION tiny_frame_param[20]; uint32_t *addre[2]; +float auto_exp; /** * @brief 参数初始化注册 * @@ -28,6 +29,7 @@ void jj_param_eeprom_init(void) PARAM_REG(aim_straight, &straight_aim, EFLOAT, 1, "str:"); PARAM_REG(aim_turn, &turn_aim, EFLOAT, 1, "tur:"); PARAM_REG(baoguang, &FIX_BINTHRESHOLD, EFLOAT, 1, "bao:"); + PARAM_REG(auto_exp_param, &auto_exp, EFLOAT, 1, "exp:"); jj_param_read(); // 注冊 } /** diff --git a/app/jj_param.h b/app/jj_param.h index fc23266..e9b3673 100644 --- a/app/jj_param.h +++ b/app/jj_param.h @@ -29,7 +29,7 @@ typedef enum { Page2_head, // 第二页参数 baoguang = Page2_head, - + auto_exp_param, Page3_head, DATA_IN_FLASH_NUM, @@ -65,4 +65,5 @@ void jj_param_eeprom_init(void); void jj_param_write(void); void jj_param_read(void); extern float data7; +extern float auto_exp; #endif \ No newline at end of file diff --git a/app/main.c b/app/main.c index 5aead52..0467c6f 100644 --- a/app/main.c +++ b/app/main.c @@ -29,6 +29,7 @@ #include "by_led.h" #include "jj_param.h" #include "jj_blueteeth.h" +#include "zf_device_config.h" int main(void) { @@ -36,7 +37,7 @@ int main(void) clock_init(SYSTEM_CLOCK_144M); system_delay_init(); debug_init(); - mt9v03x_init(); + ips200_init(IPS200_TYPE_SPI); by_led_init(); @@ -46,6 +47,9 @@ int main(void) jj_bt_init(); jj_param_eeprom_init(); + mt9v03x_init(); + mt9v03x_sccb_set_exposure_time((uint8_t)auto_exp); + Page_Init(); pit_ms_init(TIM1_PIT, 10); diff --git a/app/page/page.c b/app/page/page.c index 90c663b..b6146af 100644 --- a/app/page/page.c +++ b/app/page/page.c @@ -130,7 +130,7 @@ void Page_Init(void) PAGE_REG(page_menu, "main"); PAGE_REG(page_rtcam, "rtcam"); PAGE_REG(page_param1, "aim_param"); - PAGE_REG(page_param2, "param2"); + PAGE_REG(page_param2, "exp"); PAGE_REG(page_dparam, "dparam"); PAGE_REG(page_reset, "reset"); // PAGE_REG(page_argv); diff --git a/app/page/page_sparam1.c b/app/page/page_sparam1.c index 4661ab0..e369ec3 100644 --- a/app/page/page_sparam1.c +++ b/app/page/page_sparam1.c @@ -33,7 +33,7 @@ static void Setup() } else if (Get_new_page() == page_param2) { pafrist = Page2_head; paend = Page3_head; - ips200_show_string(0, 0, "Param2"); + ips200_show_string(0, 0, "exp"); } palong = paend - pafrist; diff --git a/app/page/page_sparam2.c b/app/page/page_sparam2.c index c8218a0..8b260ea 100644 --- a/app/page/page_sparam2.c +++ b/app/page/page_sparam2.c @@ -33,7 +33,7 @@ static void Setup() } else if (Get_new_page() == page_param2) { pafrist = Page2_head; paend = Page3_head; - ips200_show_string(0, 0, "Param2"); + ips200_show_string(0, 0, "exp"); } palong = paend - pafrist; @@ -100,6 +100,7 @@ static void Event(page_event event) return; } else if (page_event_press_long == event) { jj_param_write(); + mt9v03x_set_exposure_time(auto_exp); Page_Shift(page_menu); return; }