feat:增加曝光調參

This commit is contained in:
2024-07-08 19:14:34 +08:00
parent dc874bf6f1
commit af031e23d8
6 changed files with 13 additions and 5 deletions

View File

@@ -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(); // 注冊
}
/**

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
}