-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
Implement printSymbolDeg() helper function as method for OLED class #1743
Conversation
Oh, wait... I think I figured it out myself. Just would like to get some confirmation here... So, Wow. What a trickery. But does |
Done. Just check this out and let me know what you think. P.S. Haven't tested on the iron itself though. |
…else by switch/case
JFYI: I think I have at least one more commit to go so don't rush on merge yet. |
Done. Let me know what you think. But I still have only two questions though:
What do you think? |
Please dont. Much like Adam savage's thoughts on miscellanious drawers, I find "Utils.x" is where functions go to in my opinion of course 🙇🏼
I'm all for this. |
Sure, ok, no problem. Just asked.
Well, software is not hardware so not all approaches may be valid between these two worlds ;) ...
... BUT I see your valid points on that now! Thanks for your time explaining your vision. Ok... ok... just
In this way there will be the following object-oriented logic:
Hence, the "architecture" of this approach intuitively will be looking something like:
Just give a thought for it. DISCLAIMER! I'm just thinking out loud about my very humble knowledge of software architecture approaches and project/file organization, that's it. As always, curious about your opinion on my suggestions.
So, would you agree that
Aha!.. Well, thanks a lot for this warning since I have an idea for some another one very messy pull-request addressing end-of-line types... TL; DR: every second file in the repo has DOS EOL/CRLF/\r\n while every first file has UNIX/Linux EOL/LF/\n, regardless current It's not a big issue but it's getting a bit irritating so I would like to work on that as well but since it affects huge amount of files - not their content per se but metadata only (luckily), still it probably will require a huge update of files. For the record: OS religion has nothing to do with that (I use all modern OSes on different hardware) but since the reference environment to build & CI is gnulinux inside docker, then it should be LF EOLs only (in my opinion) for the content in the github remote repo, but for local copies obviously it should allow to use any EOLs (stripping "foreign" ones on push). Started to work on that a couple days ago. BTW So... where we were... oh, right. So, the bottom line is once I see P.S. Thanks a lot for fixing those yellow stalled github jobs BTW! |
Yes, but inside calculations we often have to use uint32_t to avoid under/overflow. So cant blanket replace things.
Ask me when its done, its part of a 3/4 set series I'm trying to get rolling, so will depend how the rest of the follow ups are going too. (see below) So as part of / spinout from #1718 I have planned a multi-step process to get to my goal of code generated layout implementations:
So you seem to have been roughly working towards the same concept where I'm heading in your OLED refactoring question 😁 I'm just getting there in a slightly different order as I'm not certain of the interfaces for steps 2 and onwards yet, so trying to shake it down and build one at a time. |
Forgot to thank you for taking your time to provide & explain all of these technical details & future plans regarding OLED/refactoring. I do appreciate it a lot! Thanks. 🙏 |
What kind of change does this PR introduce?
Implement helper function for repetitive blocks of code.
What is the current behavior?
The same snippet used a few times in code base to print degree symbol & temperature symbol.
What is the new behavior (if this is a feature change)?
Helper function to make snippet reusable in more convenient way.
Other information:
I have a couple of questions though.
Is my intuitive speculation correct that this block:
is a full equivalent to this:
I tried to figure it out myself but I couldn't dig out how exactly (according to which table of decoding chars?)
charCode
0
turns into*F
with large font insidedrawChar
. Could you, please, elaborate a bit on that? The point here is that if my assumption is correct, then the other part of code block could be put inside the helper function as well. Thanks.And what you would say about putting all the functions from all files inside
utils/
dir into one pair of files (likeUtils.cpp
/Utils.h
) instead? By brief calculations the resultingUtils.cpp
should be about something~500
lines of code which should be relatively manageable than having file-per-function approach. Just a question / suggestion from the side.