修改自动曝光

This commit is contained in:
2025-03-06 17:37:06 +08:00
parent fc5e1ad826
commit 145dde360e
4 changed files with 30 additions and 17 deletions

View File

@ -84,12 +84,12 @@ void mymain()
// uint32_t a=0;
while (1) {
while (mode == 0) {
shutter_time = 0x0000;
commander_run();
if (Receive_Data_Count != Last_Receive_Data_Count) {
uint32_t a = Opt_Snenser(90, Receive_Data_Buffer ,USART2_RX_BUFFER_SIZE,shutter_time );
if (a != 0) shutter_time = a;
else {
uint32_t a = Opt_Snenser(90, Receive_Data_Buffer ,USART2_RX_BUFFER_SIZE);
if (a != 0) {
shutter_time = a;
mode = 1;
}
Last_Receive_Data_Count = Receive_Data_Count;
@ -141,11 +141,11 @@ void mymain()
break;
case 2:
sgi(Receive_Data_Buffer,sgi_result);
Send_Data(0x61,(uint8_t *)sgi_result,515*2);
Send_Data(0x61,(uint8_t *)sgi_result,515*2);
break;
case 3:
sgi(Average_Buffer,sgi_result);
Send_Data(0x61,(uint8_t *)sgi_result,515*2);
Send_Data(0x61,(uint8_t *)sgi_result,515*2);
break;
case 4:
Send_Data(0x61,(uint8_t *)Moving_Average_Buffer,515*2);