-
-
Notifications
You must be signed in to change notification settings - Fork 952
Add OSD support for Angle of Attack #4339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for origin-betaflight-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This is great! |
|
WalkthroughThe changes introduce a new "Angle of attack" element to the On Screen Display (OSD) system. This includes adding English localization strings for the new element and its description, defining a new symbol constant for "Angle of attack," and updating the display fields to include this element for firmware versions 1.47 and above. The new display field is fully integrated with properties for name, text, description, position, draw order, and preview formatting. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OSD_Module
participant Firmware
User->>OSD_Module: Load OSD configuration
OSD_Module->>Firmware: Query firmware API version
Firmware-->>OSD_Module: Return API version (>= 1.47)
OSD_Module->>OSD_Module: Add ANGLE_OF_ATTACK to display fields
OSD_Module->>User: Render OSD with Angle of attack element
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
locales/en/messages.json (1)
5756-5763
: Good addition of localization strings for the new 'Angle of attack' OSD element.The new localization strings for the 'Angle of attack' OSD element are properly formatted and follow the established pattern for OSD elements in this file.
Consider enhancing the description for the Angle of Attack element to provide users with more context about what this element displays and why it might be useful. Most other OSD element descriptions in this file offer more detailed explanations. For example:
"osdDescElementAngleOfAttack": { - "message": "Angle of attack", + "message": "Displays the aircraft's angle of attack - the angle between the aircraft's reference line and the oncoming airflow. Useful for monitoring flight efficiency and avoiding stall conditions.", "description": "Description of the angle of attack element of the OSD" },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
locales/en/messages.json
(1 hunks)src/js/tabs/osd.js
(3 hunks)
🔇 Additional comments (3)
src/js/tabs/osd.js (3)
87-87
: Symbol addition looks goodAdding a new symbol constant for Angle of Attack with a unique hex value follows the established pattern for OSD symbols.
1582-1590
: Correctly implemented new OSD display fieldThe new Angle of Attack display field follows the appropriate structure with all required properties. The preview pattern using
${FONT.symbol(SYM.ANGLE_OF_ATTACK)}-00.0
aligns with how other angle measurements like pitch and roll are formatted.
2037-2037
: Proper field registration for appropriate firmware versionCorrectly adding the Angle of Attack field to the display fields array for firmware version 1.47 and above ensures backward compatibility.
This pull request introduces a new feature to display the "Angle of Attack" element in the On-Screen Display (OSD). The changes include updates to the localization messages, symbol definitions, and OSD field configurations.
Localization updates:
locales/en/messages.json
: Added messages and descriptions for the "Angle of Attack" element.Symbol definitions:
src/js/tabs/osd.js
: AddedSYM.ANGLE_OF_ATTACK
with the symbol code0x40
.OSD field configurations:
src/js/tabs/osd.js
: Added "ANGLE_OF_ATTACK" to theOSD.loadDisplayFields
function with relevant properties liketext
,desc
,defaultPosition
,draw_order
, andpreview
.src/js/tabs/osd.js
: IncludedF.ANGLE_OF_ATTACK
in theOSD.chooseFields
function to ensure it is selectable.Summary by CodeRabbit