From 34a42644918e0cb7e43cb9db5fd804854536fb4c Mon Sep 17 00:00:00 2001 From: Medlin Drone Date: Thu, 7 Sep 2023 10:51:37 -0400 Subject: [PATCH] Adding Configurator support for the Camera Angle Reference OSD feature 'Camera Angle Reference' and 'Camera Angle Reference Sidebar' OSD features --- locales/en/messages.json | 14 ++++++++++++++ src/js/tabs/osd.js | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/locales/en/messages.json b/locales/en/messages.json index 0e70dfe512f..f7aed4bc081 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -5290,6 +5290,20 @@ "osdDescElementHorizonSidebars": { "message": "Sidebars around artificial horizon indicator" }, + "osdTextElementCameraAngleReference": { + "message": "Camera Angle Reference", + "description": "One of the elements of the OSD" + }, + "osdDescElementCameraAngleReference": { + "message": "Camera angle reference for flying with FPV tilt gimbal" + }, + "osdTextElementCameraAngleReferenceSidebar": { + "message": "Camera Angle Reference Sidebar", + "description": "One of the elements of the OSD" + }, + "osdDescElementCameraAngleReferenceSidebar": { + "message": "Sidebar for Camera angle reference" + }, "osdTextElementCurrentDraw": { "message": "Battery current draw", "description": "One of the elements of the OSD" diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 67ab4b03bfe..83e1ef24b3b 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -1536,6 +1536,24 @@ OSD.loadDisplayFields = function() { positionable: true, preview: '1:23.456', }, + CAM_ANGLE_REFERENCE: { + name: 'CAM_ANGLE_REFERENCE', + text: 'osdTextElementCameraAngleReference', + desc: 'osdDescElementCameraAngleReference', + defaultPosition: -1, + draw_order: 555, + positionable: true, + preview: '***CAR***', + }, + CAM_ANGLE_REFERENCE_SBAR: { + name: 'CAM_ANGLE_REFERENCE_SBAR', + text: 'osdTextElementCameraAngleReferenceSidebar', + desc: 'osdDescElementCameraAngleReferenceSidebar', + defaultPosition: -1, + draw_order: 560, + positionable: true, + preview: '***SBR***||', + }, }; }; @@ -1970,6 +1988,8 @@ OSD.chooseFields = function() { F.GPS_LAP_TIME_CURRENT, F.GPS_LAP_TIME_PREVIOUS, F.GPS_LAP_TIME_BEST3, + F.CAM_ANGLE_REFERENCE, + F.CAM_ANGLE_REFERENCE_SBAR, ]); }