From 37dee02f48620b8ab940a3ec8492013ff7d2a782 Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:22:55 +0800 Subject: [PATCH 1/8] select camera type when enter the camera's built-in menu --- src/camera.c | 49 +++++++++++++++++++++++++++++++------------ src/camera.h | 22 +++++++++++++------ src/msp_displayport.c | 38 +++++++++++++++++++++++++++++++-- src/msp_displayport.h | 3 ++- 4 files changed, 90 insertions(+), 22 deletions(-) diff --git a/src/camera.c b/src/camera.c index 486da284..f469bdb3 100644 --- a/src/camera.c +++ b/src/camera.c @@ -25,6 +25,8 @@ uint8_t camRatio = 0; uint8_t camMenuStatus = CAM_STATUS_IDLE; uint8_t reset_isp_need = 0; +uint8_t camera_is_3v3 = 0; + void camera_type_detect(void) { camera_type = CAMERA_TYPE_UNKNOW; @@ -537,7 +539,7 @@ void camera_menu_draw_value(void) { uint8ToString(camera_setting_reg_menu[i - 1], str); strcpy(&osd_buf[i][osd_menu_offset + 25], str); break; - case CAM_STATUS_HVFLIP: // hv flip + case CAM_STATUS_HVFLIP: // hv flip strcpy(&osd_buf[i][osd_menu_offset + 21], hv_flip_str[camera_setting_reg_menu[i - 1]]); break; case CAM_STATUS_NIGHT_MODE: // night mode @@ -590,19 +592,15 @@ void camera_menu_init(void) { memset(osd_buf, 0x20, sizeof(osd_buf)); disp_mode = DISPLAY_CMS; - if (camera_type == CAMERA_TYPE_UNKNOW || - camera_type == CAMERA_TYPE_OUTDATED) - camera_button_enter; - else { - for (i = 0; i <= 15; i++) { - osd_buf_p = osd_buf[i] + osd_menu_offset + 3; - strcpy(osd_buf_p, cam_menu_string[i]); - } - camera_profile_menu = camera_profile_eep; - camera_setting_reg_menu_update(); - camera_menu_draw_bracket(); - camera_menu_draw_value(); + + for (i = 0; i <= 15; i++) { + osd_buf_p = osd_buf[i] + osd_menu_offset + 3; + strcpy(osd_buf_p, cam_menu_string[i]); } + camera_profile_menu = camera_profile_eep; + camera_setting_reg_menu_update(); + camera_menu_draw_bracket(); + camera_menu_draw_value(); } void camera_menu_show_repower(void) { memset(osd_buf, 0x20, sizeof(osd_buf)); @@ -927,3 +925,28 @@ uint8_t camera_status_update(uint8_t op) { return ret; } #endif + +void camera_select_menu_init(void) { + const char *cam_select_menu_string[] = { + " > ENTER ECO CAMERA MENU", + " ENTER LUX CAMERA MENU", + " EXIT", + }; + char *osd_buf_p; + uint8_t i; + + for (i = 0; i <= CAM_SELECT_EXIT; i++) { + osd_buf_p = osd_buf[i] + osd_menu_offset + 3; + strcpy(osd_buf_p, cam_select_menu_string[i]); + } +} + +void camera_select_menu_cursor_update(uint8_t index) { + uint8_t i; + for (i = 0; i <= CAM_SELECT_EXIT; i++) { + if (i == index) + osd_buf[i][osd_menu_offset + 4] = '>'; + else + osd_buf[i][osd_menu_offset + 4] = ' '; + } +} \ No newline at end of file diff --git a/src/camera.h b/src/camera.h index d4409ac4..933c1c84 100644 --- a/src/camera.h +++ b/src/camera.h @@ -15,12 +15,14 @@ #define CAMERA_SETTING_NUM 16 #define CAMERA_PROFILE_NUM 3 -#define camera_button_enter WriteReg(0, 0x14, 0x32) -#define camera_button_right WriteReg(0, 0x14, 0x58) -#define camera_button_down WriteReg(0, 0x14, 0x64) -#define camera_button_left WriteReg(0, 0x14, 0x3F) -#define camera_button_up WriteReg(0, 0x14, 0x4B) -#define camera_button_mid WriteReg(0, 0x14, 0x00) +extern uint8_t camera_is_3v3; + +#define camera_button_enter WriteReg(0, 0x14, camera_is_3v3 ? 50 : 66) +#define camera_button_right WriteReg(0, 0x14, camera_is_3v3 ? 88 : 89) +#define camera_button_down WriteReg(0, 0x14, camera_is_3v3 ? 100 : 100) +#define camera_button_left WriteReg(0, 0x14, camera_is_3v3 ? 63 : 72) +#define camera_button_up WriteReg(0, 0x14, camera_is_3v3 ? 75 : 80) +#define camera_button_mid WriteReg(0, 0x14, camera_is_3v3 ? 0 : 43) typedef enum { CAMERA_MFR_UNKNOW, @@ -81,9 +83,17 @@ typedef enum { CAM_STATUS_END, } camera_status_e; +typedef enum { + CAM_SELECT_RUNCAM_ECO = 0, + CAM_SELECT_RUNCAM_LUX, + CAM_SELECT_EXIT, +} camera_select_e; + void camera_init(); uint8_t camera_status_update(uint8_t op); void camera_menu_init(void); +void camera_select_menu_init(void); +void camera_select_menu_cursor_update(uint8_t index); extern uint8_t camRatio; extern uint8_t video_format; diff --git a/src/msp_displayport.c b/src/msp_displayport.c index 43693559..e804d532 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -1392,6 +1392,8 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt static uint8_t last_mid = 1; static uint8_t cms_cnt; + static uint8_t camera_selected = 0; + uint8_t VirtualBtn = BTN_INVALID; uint8_t IS_HI_yaw = IS_HI(yaw); @@ -1765,12 +1767,44 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt cms_cnt = 0; disp_mode = DISPLAY_CMS; clear_screen(); - camera_menu_init(); - cms_state = CMS_CAM; + if (camera_type == CAMERA_TYPE_UNKNOW || + camera_type == CAMERA_TYPE_OUTDATED) { + camera_select_menu_init(); + camera_selected = 0; + cms_state = CMS_SELECT_CAM; + } else { + camera_menu_init(); + cms_state = CMS_CAM; + } } break; } + case CMS_SELECT_CAM: { + if (VirtualBtn == BTN_UP) { + camera_selected--; + if (camera_selected > CAM_SELECT_EXIT) + camera_selected = CAM_SELECT_EXIT; + camera_select_menu_cursor_update(camera_selected); + } else if (VirtualBtn == BTN_DOWN) { + camera_selected++; + if (camera_selected > CAM_SELECT_EXIT) + camera_selected = CAM_SELECT_RUNCAM_ECO; + camera_select_menu_cursor_update(camera_selected); + } else if (VirtualBtn == BTN_RIGHT) { + camera_is_3v3 = (camera_selected == CAM_SELECT_RUNCAM_ECO); + clear_screen(); + if (camera_selected == CAM_SELECT_EXIT) { + disp_mode = DISPLAY_OSD; + cms_state = CMS_OSD; + msp_tx_cnt = 0; + } else { + camera_button_enter; + cms_state = CMS_CAM; + } + } + } break; + case CMS_CAM: { // detect to exit if (VirtualBtn == BTN_EXIT) diff --git a/src/msp_displayport.h b/src/msp_displayport.h index 1a40bf3d..cf79f8dd 100644 --- a/src/msp_displayport.h +++ b/src/msp_displayport.h @@ -96,7 +96,8 @@ typedef enum { CMS_CONFIG_NORMAL_POWER, CMS_ENTER_CAM, CMS_VTX_MENU, - CMS_CAM + CMS_CAM, + CMS_SELECT_CAM, } cms_state_e; typedef enum { From 02800ce162780012ce159bd9a354d7b5d7c827ee Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:52:11 +0800 Subject: [PATCH 2/8] adjust camera button voltage --- src/camera.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/camera.h b/src/camera.h index 933c1c84..e3084c1d 100644 --- a/src/camera.h +++ b/src/camera.h @@ -17,12 +17,12 @@ extern uint8_t camera_is_3v3; -#define camera_button_enter WriteReg(0, 0x14, camera_is_3v3 ? 50 : 66) +#define camera_button_enter WriteReg(0, 0x14, camera_is_3v3 ? 50 : 65) #define camera_button_right WriteReg(0, 0x14, camera_is_3v3 ? 88 : 89) #define camera_button_down WriteReg(0, 0x14, camera_is_3v3 ? 100 : 100) #define camera_button_left WriteReg(0, 0x14, camera_is_3v3 ? 63 : 72) #define camera_button_up WriteReg(0, 0x14, camera_is_3v3 ? 75 : 80) -#define camera_button_mid WriteReg(0, 0x14, camera_is_3v3 ? 0 : 43) +#define camera_button_mid WriteReg(0, 0x14, camera_is_3v3 ? 0 : 44) typedef enum { CAMERA_MFR_UNKNOW, From 75f733b397334e6fe8b27ffc5571830661352676 Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Fri, 23 Aug 2024 12:08:06 +0800 Subject: [PATCH 3/8] optimize camera select --- src/msp_displayport.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/msp_displayport.c b/src/msp_displayport.c index e804d532..33a7e16b 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -1781,26 +1781,28 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt } case CMS_SELECT_CAM: { - if (VirtualBtn == BTN_UP) { - camera_selected--; - if (camera_selected > CAM_SELECT_EXIT) - camera_selected = CAM_SELECT_EXIT; - camera_select_menu_cursor_update(camera_selected); - } else if (VirtualBtn == BTN_DOWN) { - camera_selected++; - if (camera_selected > CAM_SELECT_EXIT) - camera_selected = CAM_SELECT_RUNCAM_ECO; - camera_select_menu_cursor_update(camera_selected); - } else if (VirtualBtn == BTN_RIGHT) { - camera_is_3v3 = (camera_selected == CAM_SELECT_RUNCAM_ECO); - clear_screen(); - if (camera_selected == CAM_SELECT_EXIT) { - disp_mode = DISPLAY_OSD; - cms_state = CMS_OSD; - msp_tx_cnt = 0; - } else { - camera_button_enter; - cms_state = CMS_CAM; + if (last_mid) { + if (VirtualBtn == BTN_UP) { + camera_selected--; + if (camera_selected > CAM_SELECT_EXIT) + camera_selected = CAM_SELECT_EXIT; + camera_select_menu_cursor_update(camera_selected); + } else if (VirtualBtn == BTN_DOWN) { + camera_selected++; + if (camera_selected > CAM_SELECT_EXIT) + camera_selected = CAM_SELECT_RUNCAM_ECO; + camera_select_menu_cursor_update(camera_selected); + } else if (VirtualBtn == BTN_RIGHT) { + camera_is_3v3 = (camera_selected == CAM_SELECT_RUNCAM_ECO); + clear_screen(); + if (camera_selected == CAM_SELECT_EXIT) { + disp_mode = DISPLAY_OSD; + cms_state = CMS_OSD; + msp_tx_cnt = 0; + } else { + camera_button_enter; + cms_state = CMS_CAM; + } } } } break; From 30cbce56e144e99ad7a39c9bd97b2ddae5025ac4 Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:12:49 +0800 Subject: [PATCH 4/8] Lux camera support 16:9 --- src/camera.c | 15 +++++++++++++-- src/camera.h | 3 +++ src/hardware.h | 1 + src/msp_displayport.c | 28 ++++++++++++++++++++-------- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/src/camera.c b/src/camera.c index f469bdb3..35e96493 100644 --- a/src/camera.c +++ b/src/camera.c @@ -21,7 +21,7 @@ uint8_t camera_setting_reg_menu[CAMERA_SETTING_NUM]; uint8_t camera_profile_menu; uint8_t video_format = VDO_FMT_720P60; -uint8_t camRatio = 0; +uint8_t camRatio = 0; // 0->16:9 1->4:3 uint8_t camMenuStatus = CAM_STATUS_IDLE; uint8_t reset_isp_need = 0; @@ -58,7 +58,9 @@ void camera_ratio_detect(void) { break; #ifdef USE_TP9950 case CAMERA_TYPE_OUTDATED: - camRatio = 1; + camRatio = I2C_Read8_Wait(10, ADDR_EEPROM, EEP_ADDR_CAM_RATIO); + if (camRatio > 1) + camRatio = 1; break; #endif default: @@ -930,6 +932,7 @@ void camera_select_menu_init(void) { const char *cam_select_menu_string[] = { " > ENTER ECO CAMERA MENU", " ENTER LUX CAMERA MENU", + " CAMERA RATIO < >", " EXIT", }; char *osd_buf_p; @@ -939,6 +942,7 @@ void camera_select_menu_init(void) { osd_buf_p = osd_buf[i] + osd_menu_offset + 3; strcpy(osd_buf_p, cam_select_menu_string[i]); } + camera_select_menu_ratio_upate(); } void camera_select_menu_cursor_update(uint8_t index) { @@ -949,4 +953,11 @@ void camera_select_menu_cursor_update(uint8_t index) { else osd_buf[i][osd_menu_offset + 4] = ' '; } +} + +void camera_select_menu_ratio_upate() { + if (camRatio == 1) + strcpy(osd_buf[2] + osd_menu_offset + 24, " 4:3"); + else + strcpy(osd_buf[2] + osd_menu_offset + 24, "16:9"); } \ No newline at end of file diff --git a/src/camera.h b/src/camera.h index e3084c1d..a921ea11 100644 --- a/src/camera.h +++ b/src/camera.h @@ -86,6 +86,8 @@ typedef enum { typedef enum { CAM_SELECT_RUNCAM_ECO = 0, CAM_SELECT_RUNCAM_LUX, + + CAM_SELECT_RATIO, CAM_SELECT_EXIT, } camera_select_e; @@ -94,6 +96,7 @@ uint8_t camera_status_update(uint8_t op); void camera_menu_init(void); void camera_select_menu_init(void); void camera_select_menu_cursor_update(uint8_t index); +void camera_select_menu_ratio_upate(); extern uint8_t camRatio; extern uint8_t video_format; diff --git a/src/hardware.h b/src/hardware.h index 30c8e7a5..a17c44d1 100644 --- a/src/hardware.h +++ b/src/hardware.h @@ -37,6 +37,7 @@ typedef enum { #define EEP_ADDR_BAUDRATE 0x8B #define EEP_ADDR_LOWBAND_LOCK 0x8C #define EEP_ADDR_SHORTCUT 0x8D +#define EEP_ADDR_CAM_RATIO 0x8E #define EEP_ADDR_TAB3 0xA0 // 0xA0 - 0xBF #define EEP_ADDR_DCOC1 0xC0 // 0xC0 - 0xC4 #define EEP_ADDR_DCOC_EN 0xC0 diff --git a/src/msp_displayport.c b/src/msp_displayport.c index 33a7e16b..40220e40 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -1792,16 +1792,28 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt if (camera_selected > CAM_SELECT_EXIT) camera_selected = CAM_SELECT_RUNCAM_ECO; camera_select_menu_cursor_update(camera_selected); + } else if (VirtualBtn == BTN_LEFT) { + if (camera_selected == CAM_SELECT_RATIO) { + camRatio = 1 - camRatio; + camera_select_menu_ratio_upate(); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_CAM_RATIO, camRatio); + } } else if (VirtualBtn == BTN_RIGHT) { - camera_is_3v3 = (camera_selected == CAM_SELECT_RUNCAM_ECO); - clear_screen(); - if (camera_selected == CAM_SELECT_EXIT) { - disp_mode = DISPLAY_OSD; - cms_state = CMS_OSD; - msp_tx_cnt = 0; + if (camera_selected == CAM_SELECT_RATIO) { + camRatio = 1 - camRatio; + camera_select_menu_ratio_upate(); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_CAM_RATIO, camRatio); } else { - camera_button_enter; - cms_state = CMS_CAM; + camera_is_3v3 = (camera_selected == CAM_SELECT_RUNCAM_ECO); + clear_screen(); + if (camera_selected == CAM_SELECT_EXIT) { + disp_mode = DISPLAY_OSD; + cms_state = CMS_OSD; + msp_tx_cnt = 0; + } else { + camera_button_enter; + cms_state = CMS_CAM; + } } } } From cdc000e1b86fac06c88e3d12b64ddd8f0e491585 Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:17:53 +0800 Subject: [PATCH 5/8] Prompt the user to exit the camera menu --- src/camera.c | 23 ++++++++++++++--------- src/camera.h | 1 + src/msp_displayport.c | 4 +++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/camera.c b/src/camera.c index 35e96493..55765d13 100644 --- a/src/camera.c +++ b/src/camera.c @@ -930,16 +930,16 @@ uint8_t camera_status_update(uint8_t op) { void camera_select_menu_init(void) { const char *cam_select_menu_string[] = { - " > ENTER ECO CAMERA MENU", - " ENTER LUX CAMERA MENU", - " CAMERA RATIO < >", - " EXIT", + "> ECO CAMERA MENU", + " LUX CAMERA MENU", + " VTX RATIO FOR LUX CAMERA < >", + " EXIT", }; char *osd_buf_p; uint8_t i; for (i = 0; i <= CAM_SELECT_EXIT; i++) { - osd_buf_p = osd_buf[i] + osd_menu_offset + 3; + osd_buf_p = osd_buf[i] + osd_menu_offset; strcpy(osd_buf_p, cam_select_menu_string[i]); } camera_select_menu_ratio_upate(); @@ -949,15 +949,20 @@ void camera_select_menu_cursor_update(uint8_t index) { uint8_t i; for (i = 0; i <= CAM_SELECT_EXIT; i++) { if (i == index) - osd_buf[i][osd_menu_offset + 4] = '>'; + osd_buf[i][osd_menu_offset] = '>'; else - osd_buf[i][osd_menu_offset + 4] = ' '; + osd_buf[i][osd_menu_offset] = ' '; } } void camera_select_menu_ratio_upate() { if (camRatio == 1) - strcpy(osd_buf[2] + osd_menu_offset + 24, " 4:3"); + strcpy(osd_buf[2] + osd_menu_offset + 29, " 4:3"); else - strcpy(osd_buf[2] + osd_menu_offset + 24, "16:9"); + strcpy(osd_buf[2] + osd_menu_offset + 29, "16:9"); +} + +void camera_menu_mode_exit_note() { + const char note_string[] = "LEFT MOVE THROTTLE TO EXIT CAMERA MENU"; + strcpy(osd_buf[15] + 2, note_string); } \ No newline at end of file diff --git a/src/camera.h b/src/camera.h index a921ea11..ba70b684 100644 --- a/src/camera.h +++ b/src/camera.h @@ -97,6 +97,7 @@ void camera_menu_init(void); void camera_select_menu_init(void); void camera_select_menu_cursor_update(uint8_t index); void camera_select_menu_ratio_upate(); +void camera_menu_mode_exit_note(); extern uint8_t camRatio; extern uint8_t video_format; diff --git a/src/msp_displayport.c b/src/msp_displayport.c index 40220e40..5d23775d 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -1812,12 +1812,14 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt msp_tx_cnt = 0; } else { camera_button_enter; + camera_menu_mode_exit_note(); cms_state = CMS_CAM; } } } } - } break; + break; + } case CMS_CAM: { // detect to exit From ed159eeae36c5b782dfcb4eb90a245813f8e3f25 Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:02:40 +0800 Subject: [PATCH 6/8] auto exit cam menu mode if timeout (60 sec) --- src/msp_displayport.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/msp_displayport.c b/src/msp_displayport.c index 5d23775d..8fd1c8a2 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -69,6 +69,10 @@ uint8_t mspVtxLock = 0; uint8_t init_table_done = 0; uint8_t init_table_unsupported = 0; +#ifdef USE_TP9950 +uint16_t cam_menu_timeout_sec = 0; +#endif + uint8_t crc8tab[256] = { 0x00, 0xD5, 0x7F, 0xAA, 0xFE, 0x2B, 0x81, 0x54, 0x29, 0xFC, 0x56, 0x83, 0xD7, 0x02, 0xA8, 0x7D, 0x52, 0x87, 0x2D, 0xF8, 0xAC, 0x79, 0xD3, 0x06, 0x7B, 0xAE, 0x04, 0xD1, 0x85, 0x50, 0xFA, 0x2F, @@ -1395,6 +1399,7 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt static uint8_t camera_selected = 0; uint8_t VirtualBtn = BTN_INVALID; + static uint8_t VirtualBtn_last = BTN_INVALID; uint8_t IS_HI_yaw = IS_HI(yaw); uint8_t IS_LO_yaw = IS_LO(yaw); @@ -1813,6 +1818,7 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt } else { camera_button_enter; camera_menu_mode_exit_note(); + cam_menu_timeout_sec = seconds; cms_state = CMS_CAM; } } @@ -1844,7 +1850,25 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt break; } } // switch + last_mid = mid; + +#ifdef USE_TP9950 + if (cms_state == CMS_CAM && (camera_type == CAMERA_TYPE_UNKNOW || camera_type == CAMERA_TYPE_OUTDATED)) { + if (VirtualBtn_last == VirtualBtn) { + if (seconds - cam_menu_timeout_sec >= 60) { + // exit cam menu + disp_mode = DISPLAY_OSD; + cms_state = CMS_OSD; + fc_init(); + msp_tx_cnt = 0; + } + } else { + cam_menu_timeout_sec = seconds; + } + } + VirtualBtn_last = VirtualBtn; +#endif } void vtx_menu_init() { From 7ceb2934af193dd1f50c1d8b207909bcb55db9ae Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:23:11 +0800 Subject: [PATCH 7/8] optimize camera_select_menu_ratio_upate --- src/camera.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/camera.c b/src/camera.c index 55765d13..792cfc0f 100644 --- a/src/camera.c +++ b/src/camera.c @@ -932,7 +932,7 @@ void camera_select_menu_init(void) { const char *cam_select_menu_string[] = { "> ECO CAMERA MENU", " LUX CAMERA MENU", - " VTX RATIO FOR LUX CAMERA < >", + " VTX RATIO FOR LUX CAMERA <4:3> ", " EXIT", }; char *osd_buf_p; @@ -957,12 +957,12 @@ void camera_select_menu_cursor_update(uint8_t index) { void camera_select_menu_ratio_upate() { if (camRatio == 1) - strcpy(osd_buf[2] + osd_menu_offset + 29, " 4:3"); + strcpy(osd_buf[2] + osd_menu_offset + 28, "<4:3> "); else - strcpy(osd_buf[2] + osd_menu_offset + 29, "16:9"); + strcpy(osd_buf[2] + osd_menu_offset + 28, "<16:9>"); } void camera_menu_mode_exit_note() { const char note_string[] = "LEFT MOVE THROTTLE TO EXIT CAMERA MENU"; - strcpy(osd_buf[15] + 2, note_string); + strcpy(osd_buf[15] + 5, note_string); } \ No newline at end of file From 9a6f1f12d0ffe2d26d71982d2e6fe4903585ffda Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:54:21 +0800 Subject: [PATCH 8/8] fix build error --- src/msp_displayport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/msp_displayport.c b/src/msp_displayport.c index 8fd1c8a2..b2ec86e7 100644 --- a/src/msp_displayport.c +++ b/src/msp_displayport.c @@ -1818,7 +1818,9 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt } else { camera_button_enter; camera_menu_mode_exit_note(); +#ifdef USE_TP9950 cam_menu_timeout_sec = seconds; +#endif cms_state = CMS_CAM; } }