Skip to content

HDZERO VTX OSD Support#7668

Merged
DzikuVx merged 22 commits intoiNavFlight:masterfrom
geoffsim:HDZeroVTX
Jan 25, 2022
Merged

HDZERO VTX OSD Support#7668
DzikuVx merged 22 commits intoiNavFlight:masterfrom
geoffsim:HDZeroVTX

Conversation

@geoffsim
Copy link
Copy Markdown
Contributor

Update OSD coordinate system to allow up to 64x64 (HD) from original of 32x32 (SD).

Update DJI OSD code to map back to SD coordinate system.
Update DJI fixed element co-ordinates to be more central on screen.

Add HD ZERO OSD support for 50x18 OSD canvas.

(See also PR for supporting configurator changes)

@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Dec 19, 2021

Awesome!

@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Dec 19, 2021

So far, you have not run python script to generate Settings.md
And I see that are some intendation problems in the code.
I will try to review next week

@geoffsim
Copy link
Copy Markdown
Contributor Author

I have run the script and updated the PR, but the test is still failing. I ran the same test on my local branch and it passes ok.
Please advise.

@MrD-RC
Copy link
Copy Markdown
Member

MrD-RC commented Dec 24, 2021

I just had a look a settings.md and it needs to be updated. If you look for a boolean value, it should have off and on in the min and max table columns respectively.

You may need to fetch upstream on your branch to get the latest documents generating script.

@geoffsim
Copy link
Copy Markdown
Contributor Author

geoffsim commented Dec 24, 2021 via email

@MrD-RC
Copy link
Copy Markdown
Member

MrD-RC commented Dec 24, 2021

There is definitely a problem with the settings.md file. In this screenshot, the settings.md on the left is the one submitted with this PR. The one on the right is the master. Check out the beeper_pwm_mode section. You can see on the master that the MIN and MAX in the table have OFF and ON. The version in this PR does not.

image

How does the file look on your computer? If you have the OFF and ON in the beeper_pwm_mode table, it's correct and just hasn't been pushed to the change branch. if the OFF and ON for MIN and MAX are missing, you have the wrong document creation script. If you perform a fetch upstream on your branch, it should get the correct creation script. It is src/utils/update_cli_docs.py and should have the lines:

66 | member["min"] = "OFF"
67 | member["max"] = "ON"

I just checked your branch, and the creation script is not up to date. So the fetch upstream on your branch should get everything sorted.

@geoffsim
Copy link
Copy Markdown
Contributor Author

geoffsim commented Dec 24, 2021 via email

@geoffsim
Copy link
Copy Markdown
Contributor Author

Please do not merge yet as I am working on an optimisation to reduce the amount of data being sent over the serial port.

@geoffsim
Copy link
Copy Markdown
Contributor Author

geoffsim commented Jan 5, 2022

Ok, all done. Please consider for merging .
An issue raised in discord groups found a problem that was crashing some F722 flight controllers, but this ended up being a hardware issue. However, it did prompt me to redesign the HD Zero OSD code to reduce the amount of data being sent to the VTX and to stop sending altogether if the VTX is not detected.

@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Jan 5, 2022

Thanks @geoffsim I'll quickly check analog functions and DJI for regression and then we will go futher

@geoffsim
Copy link
Copy Markdown
Contributor Author

geoffsim commented Jan 5, 2022

Apologies for the late change. A flight test today showed an issue with the AHI when aircraft nears a 90 degree bank.

The AHI code needs work at some stage to reduce the number of changes reported each time it is called. Currently it (AHI code) blanks out the AHI and then redraws it. This can create a lot of changes that have to be sent to the OSD, especially around the 90 degree bank when the AHI is spanning multiple lines. I'm sure the code could be optimised.

@DzikuVx DzikuVx added this to the 4.1 milestone Jan 8, 2022
@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Jan 13, 2022

@geoffsim This PR completely breaks the Analog OSD functionality. After flashing with default, no elements are visible and I found no way to make them visible. This has to be fixed before merging.

Copy link
Copy Markdown
Member

@DzikuVx DzikuVx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR breaks Analog OSD function, no OSD elements are visible

@geoffsim
Copy link
Copy Markdown
Contributor Author

geoffsim commented Jan 13, 2022 via email

@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Jan 13, 2022

Thanks @geoffsim
I think it's connected with changed visibility flag

@geoffsim
Copy link
Copy Markdown
Contributor Author

Fixed, tested, and added to the PR.
The initialisation in fc_init.c was stealing the displayPort regardless of whether HDZero was selected or not.
I followed the example of the frsky code to fix this.
I had also broken the analog AHI display when I reduced the calls to drawScreen(). I have reverted that change.

Regards,
Geoff.

@error414
Copy link
Copy Markdown
Contributor

Does it work with all HD-receivers?

@geoffsim
Copy link
Copy Markdown
Contributor Author

All HDZero VTX and VRX models, yes.

@geoffsim
Copy link
Copy Markdown
Contributor Author

I have some more changes to come in the next few days. Please do not review until then.

@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Jan 18, 2022 via email

@geoffsim
Copy link
Copy Markdown
Contributor Author

Changes complete. Please review.

@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Jan 21, 2022

Nice! I'll test and review when I will find a moment

@geoffsim
Copy link
Copy Markdown
Contributor Author

I promise to not make any more changes! That last one was important to facilitate the "OSD OFF" mode.
The changes have been flight tested with success.

Known issue (HDZero VTX specific):
When exiting the Camera or VTX menus, the OSD will not redraw fully.
This will be fixed in the next VTX update (not iNav).
A temporary work around is to switch to a different OSD (or OSD OFF) and back again.

@DzikuVx DzikuVx changed the base branch from master to release_4.1.0 January 25, 2022 07:50
@DzikuVx DzikuVx changed the base branch from release_4.1.0 to master January 25, 2022 07:53
@DzikuVx DzikuVx merged commit b19a60c into iNavFlight:master Jan 25, 2022
@DzikuVx
Copy link
Copy Markdown
Member

DzikuVx commented Jan 25, 2022

And it's merged. I will run some more tests and build PR1 for 4.1 quite soon

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.

4 participants