Skip to content
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

Osd custom #9508

Merged
merged 1 commit into from Feb 14, 2024
Merged

Osd custom #9508

merged 1 commit into from Feb 14, 2024

Conversation

error414
Copy link
Contributor

@error414 error414 commented Nov 22, 2023

Hi,

Description

As i talked here #9497 I implemented OSD custom elements for INAV.
It's designed mainly for cooperation with programing framework, without programming framework it does not make sense.

In default are there 3 custom osd elements with three part plus visibility settings. Each part can be set to:
none don't use that part
text show text (for save memory can be set as "text" only one part of element), max 15 chars [A-Z0-9]
icon static user select icon which he wants to show
icon gv icon is driven by global variable value
gv shows global variable value

Visibility can be show only to
gv driven by global variable 0 = hidden , x > 0 = showed
always it's clear :)

Here is demo from development. https://www.youtube.com/watch?v=LKFFJfYywM4
image
image

Custom elements are in "Global variables" section in OSD tab, because custom osd elements are higtly connected to programming framework. I can change in.

If this PR will be merged then global variables and Switch Indicator Settings can be removed because these elements can be easily replaced by custom elements.

Code

I tried to folow INAV standarts and use same programming style as it's used in inav, but still please go throught code carefully and check it properly. I'm not sure about saving char array in cli. In the cli.c is hardcoded number of part for custom elements, I did not know how to do dynamically. Maybe not worth to do dynamically.

And next whether it's good uidea to use separated file for custom OSD elements.

Configurator

PR for configurator: iNavFlight/inav-configurator#1901

@error414 error414 marked this pull request as ready for review November 22, 2023 16:32
@error414 error414 force-pushed the osd_custom branch 2 times, most recently from 3c5a67b to c201a4d Compare December 2, 2023 18:32
@error414 error414 marked this pull request as draft December 2, 2023 20:55
@error414
Copy link
Contributor Author

error414 commented Dec 3, 2023

https://youtu.be/BqkDo-2O7js?si=yss03OEfJrJPk7TY&t=28 tested outside and it works really nice.

If it's aremed and altitude is below 15m, then on OSD is text "!GROUND! [atlitude_number][altitude_icon]" it programmed in inav programming framework.

I fixed some minor bugs and allowed more chars for text [^A-Z0-9!.\* ]

Maybe would be nice to add posibility to set blinking text. And connect vidibility to logic condition instead of GV

@error414 error414 force-pushed the osd_custom branch 2 times, most recently from 670434e to 0f212ff Compare December 21, 2023 16:33
@error414
Copy link
Contributor Author

A small improvement.

  1. visibility can be driven by logic condition.
  2. added more number formation for value from global variable
  • 00000
  • 000.00
  • 000
  • 0.0

https://www.youtube.com/watch?v=6RW082clPyA

@error414 error414 marked this pull request as ready for review December 28, 2023 09:18
@error414 error414 force-pushed the osd_custom branch 2 times, most recently from faf40f8 to 24b280a Compare February 4, 2024 09:02
@MrD-RC MrD-RC added this to the 8.0 milestone Feb 12, 2024
@error414 error414 changed the base branch from master to release_7.1.0 February 12, 2024 17:51
@MrD-RC MrD-RC modified the milestones: 8.0, 7.1 Feb 12, 2024
@DzikuVx
Copy link
Member

DzikuVx commented Feb 13, 2024

@error414 please resolve conflicts I will want to merge and build the release ASAP

@sensei-hacker
Copy link
Collaborator

I see Pawel is merging this, which is great because it looks like it could be very useful.
I wouldn't want people to miss out because they don't know how to use it. Can you write up a little documentation, which will probably be a in a different PR?

Maybe with a couple examples as screenshots.

@Jetrell
Copy link

Jetrell commented Feb 14, 2024

Can you write up a little documentation, which will probably be a in a different PR?
Maybe with a couple examples as screenshots.

@sensei-hacker Its done - https://github.com/iNavFlight/inav/wiki/OSD-custom-messages

@DzikuVx DzikuVx merged commit 4932542 into iNavFlight:release_7.1.0 Feb 14, 2024
14 checks passed
@error414 error414 deleted the osd_custom branch February 15, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants