diff --git a/src/camera.c b/src/camera.c index 8cf3ecc..f766e40 100644 --- a/src/camera.c +++ b/src/camera.c @@ -734,21 +734,22 @@ uint8_t camera_status_update(uint8_t op) { if (op == BTN_RIGHT) { camera_profile_eep = camera_profile_menu; - camera_profile_write(); - reset_isp_need |= camera_set(camera_setting_reg_menu, 1, 0); - camera_setting_reg_eep_update(); - camera_setting_profile_write(0xff); - if (reset_isp_need) { - if (camera_mfr == CAMERA_MFR_RUNCAM) { - runcam_reset_isp(); - camera_mode_detect(0); - } - } - if (RF_BW_check()) { + if (RF_BW_to_be_changed()) { camera_menu_show_repower(); camMenuStatus = CAM_STATUS_REPOWER; } else { + camera_profile_write(); + reset_isp_need |= camera_set(camera_setting_reg_menu, 1, 0); + camera_setting_reg_eep_update(); + camera_setting_profile_write(0xff); + + if (reset_isp_need) { + if (camera_mfr == CAMERA_MFR_RUNCAM) { + runcam_reset_isp(); + camera_mode_detect(0); + } + } camera_menu_show_saving(); saving_start_sec = seconds; camMenuStatus = CAM_STATUS_SAVING; @@ -760,6 +761,17 @@ uint8_t camera_status_update(uint8_t op) { #ifdef _DEBUG_MODE debugf("\r\nRF_Delay_Init: None"); #endif + camera_profile_write(); + reset_isp_need |= camera_set(camera_setting_reg_menu, 1, 0); + camera_setting_reg_eep_update(); + camera_setting_profile_write(0xff); + if (reset_isp_need) { + if (camera_mfr == CAMERA_MFR_RUNCAM) { + runcam_reset_isp(); + camera_mode_detect(0); + } + } + if (PIT_MODE != PIT_OFF) { Init_6300RF(RF_FREQ, POWER_MAX + 1); vtx_pit = PIT_P1MW; diff --git a/src/hardware.c b/src/hardware.c index 77ff91c..1f7af96 100644 --- a/src/hardware.c +++ b/src/hardware.c @@ -1488,9 +1488,9 @@ void LED_Task() { } } -uint8_t RF_BW_check(void) { +uint8_t RF_BW_to_be_changed(void) { uint8_t ret = 0; - if (camera_type == CAMERA_TYPE_RUNCAM_NANO_90 && camera_setting_reg_set[11] == 2) + if (camera_type == CAMERA_TYPE_RUNCAM_NANO_90 && camera_setting_reg_menu[11] == 2) RF_BW = BW_17M; else RF_BW = BW_27M; diff --git a/src/hardware.h b/src/hardware.h index ae072fe..0763acb 100644 --- a/src/hardware.h +++ b/src/hardware.h @@ -94,7 +94,7 @@ void Flicker_LED(uint8_t n); void LED_Flip(); void LED_Task(); -uint8_t RF_BW_check(void); +uint8_t RF_BW_to_be_changed(void); void uart_baudrate_detect(void); uint8_t temperature_level(void); void vtx_paralized(void);