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

Update the print functions #257

Merged
merged 8 commits into from
Oct 11, 2022
Merged

Update the print functions #257

merged 8 commits into from
Oct 11, 2022

Conversation

yubiuser
Copy link
Member

@yubiuser yubiuser commented Aug 18, 2022

What does this PR aim to accomplish?:

This PR serves multiple purposes.

  1. It removes the CleanEcho and CleanPrintf functions. Both were introduced with Eliminate flashing by repainting rather than replacing #74. They solved the issue that after re-sizing the screen artifacts could remain. CleanPrintf did not serve any purpose, it was rather an intermediate state during this initial PR and was kept because it fitted the CleanEcho function well. The "cleaning" was done in the format string of the printf function with \e[0K already. CleanEcho was broken since Multiple Issues Fixed. PLEASE SEE COMMENT! #106, as the line needs clearing after the new output was written, not before.
  2. It introduces the new ${clean_line} which does the same as the old \e[0K but with the (more generic) \e033[0K
  3. It changes all CleanEcho to printf functions
  4. It re-arranged the code blocks for the generation of the "Dashboards". So far, the code was organized by the information that should be displayed and then broken down by the screen size. Now we break down by screen size only. This has the big advantage that the code "displays" the final output in one place. One can now easily see what information are displayed for each screen size, without hopping between different functions. The code of PrintLogo() is now duplicated (once in this functions and once separated for each screen size) but this is a minor drawback.
  5. Fixes PADD 3.8.0 display error with 3.5" PiTFT #251. With the addition of the interface and the model type, the number of lines increased and was (partially) greater then the "screen sizes".

By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

  • I have read the above and my PR is ready for review. Check this box to confirm

@yubiuser yubiuser force-pushed the clean_printfunctions branch from a453eda to f44bae9 Compare August 19, 2022 18:40
@yubiuser yubiuser changed the base branch from master to development August 19, 2022 18:40
@yubiuser yubiuser force-pushed the clean_printfunctions branch 2 times, most recently from 793dde7 to 0b4351c Compare August 20, 2022 13:24
@yubiuser yubiuser linked an issue Aug 20, 2022 that may be closed by this pull request
@yubiuser yubiuser changed the title Clean printfunctions Update the print functions Aug 20, 2022
@yubiuser yubiuser mentioned this pull request Sep 27, 2022
Signed-off-by: Christian König <[email protected]>
… print functions. This should make it easier to spot misalignments and outputs that are bigger than the minimal screen sizes

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
@yubiuser yubiuser force-pushed the clean_printfunctions branch from 5414d1b to 2dd7a81 Compare October 7, 2022 12:39
@yubiuser yubiuser marked this pull request as ready for review October 7, 2022 12:39
Signed-off-by: Christian König <[email protected]>
@yubiuser yubiuser requested a review from a team October 7, 2022 12:49
Copy link
Member

@rdwebdesign rdwebdesign left a comment

Choose a reason for hiding this comment

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

No visual problems found.

@yubiuser yubiuser requested a review from dschaper October 11, 2022 18:03
@yubiuser yubiuser merged commit 9510f2f into development Oct 11, 2022
@yubiuser yubiuser deleted the clean_printfunctions branch October 11, 2022 20:03
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.

PADD 3.8.0 display error with 3.5" PiTFT
3 participants