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

Add number of improvements to the label maker standard sketch #1

Draft
wants to merge 26 commits into
base: base
Choose a base branch
from

Conversation

bboe
Copy link
Owner

@bboe bboe commented Dec 4, 2024

The first three commits on this PR are simply clean-up and some organization to make following along with the subsequent commits easier.

Notable changes:

  • Enable joystick up/down to wrap around the beginning/end of the character selection
  • Combine alphabet characters and their vectors into a single structure
  • Fix bug where current character replaces previous character on backspace
  • Use LCD's built-in blink support
  • Display text to be printed on the print menu, and blink the character currently being printed
  • Simplify variable-width character support
  • Reduce SRAM (memory) usage from 83% to 30% primarily by using F(...) for strings and PROGMEM for the array of character/vector structures

For comparison the output from compilation before these improvements:

Sketch uses 14496 bytes (44%) of program storage space. Maximum is 32256 bytes.
Global variables use 1714 bytes (83%) of dynamic memory, leaving 334 bytes for local variables. Maximum is 2048 bytes.

And the output after these improvements:

Sketch uses 11584 bytes (35%) of program storage space. Maximum is 32256 bytes.
Global variables use 633 bytes (30%) of dynamic memory, leaving 1415 bytes for local variables. Maximum is 2048 bytes.

@bboe bboe force-pushed the label_maker_standard_improvements branch from e3fdf8a to 9bf76f3 Compare December 8, 2024 18:16
@bboe bboe changed the base branch from main to base December 8, 2024 21:25
@bboe bboe force-pushed the label_maker_standard_improvements branch from 9bf76f3 to dcb41b5 Compare December 9, 2024 01:07
bboe added 8 commits December 8, 2024 22:22
Rename:
- line to plotLine
- plot to setPen

Normalize X/Y variables to termX, termY

Add additional define constants

Remove unused conditional pertaining to dashed drawing
As part of this change, use a fixed-width character array to hold chosen
characters, rather than a string type.
Increase `SERVO_DELAY` to ensure points can be plotted
@bboe bboe force-pushed the label_maker_standard_improvements branch from dcb41b5 to 37ac6a5 Compare December 9, 2024 06:25
bboe added 17 commits December 8, 2024 23:24
Instead, we can simply replace the `222` with 100 more than the previous point
The updated behavior moves the cursor back while keeping the selected character
at that position. This behavior seems more natural and is more friendly to
accidentally advancing the cursor forward and returning back to editing the
intended character.
This change enables us to do away with the special handling of `_` as a space
character.
Two things are done to accomplish this:

1) Don't allow the cursor to advance beyond the 16th space

2) Return the cursor to the last added character after a "no" confirmation
   rather than to the position to the right of the last added character
Additionally, rename and sort states for improved consistency.
@bboe bboe force-pushed the label_maker_standard_improvements branch from 37ac6a5 to b3854d7 Compare December 9, 2024 07:25
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.

1 participant