Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Position OSD Elements via Script #463

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

Merged
klutvott123 merged 1 commit into betaflight:master from druckgott:druckgott-osd_pos
Dec 20, 2022
Merged

Position OSD Elements via Script #463

klutvott123 merged 1 commit into betaflight:master from druckgott:druckgott-osd_pos
Dec 20, 2022

Conversation

Copy link
Contributor

@druckgott druckgott commented Dec 5, 2022

I added a new page where all osd elements are listet and you can select via the first filed by changing the number up and down each osd element.
On the lower area you can see the name of the osd element and more lower you can see the position value and the profil where this osd element is visible.

You can change the position and also the profil and then save the value and the osd will be updated.

Copy link
Contributor Author

I did something wrong I think, I want to remove all commits expect the last two how descriped here:
#457 (comment)
But anyting go wrong.
I change from the 9 commits listed only the 3 one I do not want to have to fixup and then I pushed again over cmd git: git push --force-with-lease
But then I see also old comits inside?! Do I have to change the git rebase -i HEAD(削除) 9 to git rebase -i HEAD (削除ここまで)5 and then change pick to fixup only for the one I want to hold anymore?

Copy link
Member

@druckgott druckgott requested review from haslinghuis and klutvott123 and removed request for haslinghuis and klutvott123 December 7, 2022 15:42
Copy link
Member

I'm trying this now, and I'm not sure I understand how it's supposed to work. I can't change anything. It goes through all retries and the changes won't take effect.

Copy link
Contributor Author

The Adress you can change to select the osd element you want to change.
The you have to go down to the line where the on off points are if all 3 points are off you will not see the element in the osd
If one of it is one you can see the element in the osd, this the first number you can change the position, if you are if you then save the osd element should be on a mother position if you atere in the right osd page.
So my idea was at first only to move a element if you see on the field it's not fitting perfekt lx you like it and you have no pc here.

Copy link
Contributor Author

druckgott commented Dec 8, 2022
edited
Loading

Copy link
Contributor Author

I'm trying this now, and I'm not sure I understand how it's supposed to work. I can't change anything. It goes through all retries and the changes won't take effect.

Did you see the video? What system do you have for me it works perfekt, I have a taranis x light pro.

Copy link
Member

Yes, I saw the video. I have a taranis qx7. Tested with fport and tracer. FC config is minimal. Just rx and osd enabled. I can make changes in the configurator and they show up in the script. It may be that my test setup is a little too minimal.

Copy link
Contributor Author

What I'm not sure if the addresses are always the same or if they depend what's aktivated for example gps, but I do not know how to read out the availible elements due to the config like the betaflight editor do. If anybody can help me there maybe that's better?!

Copy link
Member

What I'm not sure if the addresses are always the same or if they depend what's aktivated for example gps, but I do not know how to read out the availible elements due to the config like the betaflight editor do. If anybody can help me there maybe that's better?!

They should be the same. I got it working here by clearing the values table before preparing the payload when saving. See one of the comments above for explanation.

Copy link
Member

I'll just add that this doesn't work with ELRS because MSP_OSD_CONFIG results in a huge payload spread across more than 2 CRSF frames. Not much we can do about it here as it's a ELRS limitation.

pfeerick reacted with confused emoji

Copy link
Contributor Author

druckgott commented Dec 11, 2022
edited
Loading

I did most changes expect this two:

Copy link
Contributor Author

I changed all the things, hopefully I get everything ;-). Thx for your good Ideas it helps me to improve my programming skills ;-).

klutvott123 reacted with thumbs up emoji

@druckgott druckgott requested review from klutvott123 and removed request for haslinghuis December 17, 2022 09:02
Copy link
Member

Almost there. Just some minor things that need fixing.
There are probably more optimizations that could be done here with regard to memory use, but it's ok for now I think.

Copy link
Contributor Author

hopefully all is ok now ;-)

Copy link
Member

Looks good 🙂 Just need to squash/fixup to one commit now

Copy link
Contributor Author

Hopefully all is fine now, I ́m not shure if I did everything right, but I hope only on commit is visible with the right input.

klutvott123 reacted with thumbs up emoji

Copy link
Member

@klutvott123 klutvott123 left a comment

Choose a reason for hiding this comment

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

Looks good to me 🙂

Comment on lines 146 to 148
local fieldThirdProfile = bit32.band(bit32.rshift(profiles, 1), 1)
local fieldFourthProfile = bit32.band(bit32.rshift(profiles, 2), 1)
return fieldPos, fieldFirstProfile, fieldThirdProfile, fieldFourthProfile
Copy link
Member

@haslinghuis haslinghuis Dec 19, 2022

Choose a reason for hiding this comment

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

Logic stays the same but guess:

FieldFourthProfile should be FieldThirdProfile
FieldThirdProfile should be FieldSecondProfile

klutvott123 reacted with thumbs up emoji
Copy link
Member

@klutvott123 klutvott123 Dec 19, 2022

Choose a reason for hiding this comment

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

lol good catch. 🥇
@druckgott Please fix 😁

Copy link
Contributor Author

@druckgott druckgott Dec 19, 2022

Choose a reason for hiding this comment

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

I will fix tomorrow

klutvott123 reacted with thumbs up emoji
Copy link
Contributor Author

@druckgott druckgott Dec 20, 2022

Choose a reason for hiding this comment

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

It ́s fixed

Add Page for Position OSD Elements (Betaflight 4.4 MSP)
Add osd pos Page
Update pos_osd.lua
Update pages.lua
Update pos_osd.lua
@klutvott123 klutvott123 merged commit 0d0b60c into betaflight:master Dec 20, 2022
@druckgott druckgott deleted the druckgott-osd_pos branch December 20, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@klutvott123 klutvott123 klutvott123 approved these changes

@haslinghuis haslinghuis haslinghuis left review comments

Projects
None yet
Milestone
1.7
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /