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

WIP: run-time configuration #59

Closed
wants to merge 10 commits into from
Closed

Conversation

vortigont
Copy link
Collaborator

@vortigont vortigont commented Jan 13, 2021

This is still work-in-progress, but I thought that @mrfaptastic you might wanna look into this and test/add some feedback for other panel types that I do not have.
What is done:

  • dynamic class configuration on initialization, no need to change defines in .h files
  • some internal structures replaced with dynamically allocated/managed objects
  • obsolete fast/slow mode, now it is always "fast", brightness control takes care of control bits on-change
  • flicker-less brightness control in 'fast' mode

known issues:

  • artefacts every 128 column (FIXED)
  • some times fine gradients looks harsh/some times not, might be brightness related issue (FIXED)

P.S. It breaks the API a little bit ) (FIXED)

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
Now almost all options for panel/i2s buffers could be run-time defined,
no need to use compile-time defines.
This breaks API!

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
clear shiftregs after init for FM drivers

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
fastmode deprecated, now it is always fast, control bits are updated on brightness change w/o loosing data bits

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
Signed-off-by: Emil Muratov <gpm@hotplug.ru>
Signed-off-by: Emil Muratov <gpm@hotplug.ru>
@vortigont vortigont marked this pull request as draft January 13, 2021 12:45
@vortigont
Copy link
Collaborator Author

something is working :)
HUB75_ctrl

@mrcodetastic
Copy link
Owner

Thanks for this. I have created a new branch and made a pull request from your repository. There's a lot of change to merge into the master. My main concern is keeping backwards compatability.

@vortigont
Copy link
Collaborator Author

Got it, thanks. Actually only begin([pins]) is incompatible with custom pin mapping. I could overload it with wrapper to cfg struct to keep an old option compatible.
As for the other methods I only removed fastmode() switcher that I've introduced not so long ago.
Pls, feel free to review and post your comments, it is still work in progress anyway :)

@mrcodetastic
Copy link
Owner

By the way, this is really good stuff so thank you again for your contribution. If you could create an overload warpper to the cfg struct for begin() that would be excellent.

Any ideas what might cause the artefact at column 128? I'll take a look and see if i see anything on my non-FM panels.

@vortigont
Copy link
Collaborator Author

You are welcome ) Have some other ideas in mind also
Yes, I've already fixed that artefacts, will push update later today along with overloaded begin(). But need more tests with colours/brightness.
And just to make it clear - only the existing option for pin definition's could be reassigned via begin(). Most of the other stuff like modules size's etc could be defined on class instance creation only to prevent out-of-bounds issues.
Might think about full reinitialization options in future though :)

+ construct/overloads for backward compatibility
* fixed edge ghosting
+ added some guard checks

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
@vortigont
Copy link
Collaborator Author

Pushed a commit with compatibility overloads and a fix for column artefacts.

@vortigont vortigont marked this pull request as ready for review January 14, 2021 15:57
Signed-off-by: Emil Muratov <gpm@hotplug.ru>
@vortigont
Copy link
Collaborator Author

So, it looks pretty good for me now, no visible artefacts left. Need more testers with other matrixes to confirm/report issues :)
Also might need to change existing examples one way or another.

@mrcodetastic
Copy link
Owner

Farkin fantastic work as always! Good stuff! Going to test it tonight. I like how you've c++ ified the framebuffer structs more instead of being a mix of old c code.

@vortigont
Copy link
Collaborator Author

thanks! yup, took me a while to dig through those nested arrays :)
But I like the whole idea of this library - looks pretty ) Pls, feel free to revise my comments and code for syntax/grammar/spelling. English is not my native, so as cpp, he he :)

Signed-off-by: Emil Muratov <gpm@hotplug.ru>
@mrcodetastic
Copy link
Owner

mrcodetastic commented Jan 18, 2021

Hi vortigont, I'm giving you access to the repo directly, please feel free to make changes to the dev branch directly. If you want to propose changes to the master branch can you please raise/propose pull requests from your repo for me to review. Thank you!

@vortigont
Copy link
Collaborator Author

Oh, that's very kind of you, Thanks!
Will update some more examples to the new format than to prepare it for the upcoming merge.
Won't touch master branch.
Cheers!

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.

2 participants