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

mcufont: Initial addition of MCUFont package #19726

Merged
merged 2 commits into from
Aug 16, 2023
Merged

Conversation

bergzand
Copy link
Member

@bergzand bergzand commented Jun 11, 2023

Contribution description

This adds the MCUFont library as a package to RIOT. Only the decoder part has been packaged. I did not touch the font generation, so the test includes a manually compressed font created via the tooling included in the package.

The included patch files have been submitted as PR upstream in mcufont/mcufont#30

Testing procedure

Run the test on Native or on any board, The output should be along the lines of:

2023-06-11 21:56:40,685 # Help: Press s to start test, r to print it is ready
s
2023-06-11 21:56:42,651 # START
2023-06-11 21:56:42,652 # main(): This is RIOT! (Version: 2023.07-devel-512-g49ee9-pr/mcufont)
2023-06-11 21:56:42,652 # Generated RIOT application: 'mcufont'
2023-06-11 21:56:42,653 #                                                                                                                                 |
2023-06-11 21:56:42,654 #                                                                                                                                 |
2023-06-11 21:56:42,694 #                   █  █                                                                                                          |
2023-06-11 21:56:42,695 #  █     █          █  █                  █████   █    ███   ███████  █                                                           |
2023-06-11 21:56:42,697 #  █     █          █  █                  █    █  █   █   █     █     █                                                           |
2023-06-11 21:56:42,737 #  █     █   ████   █  █   ████           █    █  █  █     █    █     █                                                           |
2023-06-11 21:56:42,739 #  █     █  ██  ██  █  █  ██  ██          █    █  █  █     █    █     █                                                           |
2023-06-11 21:56:42,740 #  ███████  █    █  █  █  █    █          █████   █  █     █    █     █                                                           |
2023-06-11 21:56:42,781 #  █     █  ██████  █  █  █    █          █   █   █  █     █    █     █                                                           |
2023-06-11 21:56:42,782 #  █     █  █       █  █  █    █          █    █  █  █     █    █                                                                 |
2023-06-11 21:56:42,783 #  █     █  ██   █  █  █  ██  ██  █       █    █  █   █   █     █     █                                                           |
2023-06-11 21:56:42,807 #  █     █   ████   █  █   ████   █       █     █ █    ███      █     █                                                           |
2023-06-11 21:56:42,807 # { "threads": [{ "name": "idle", "stack_size": 256, "stack_used": 220 }]}
2023-06-11 21:56:42,808 # { "threads": [{ "name": "main", "stack_size": 1280, "stack_used": 436 }]}

Issues/PRs references

None

@bergzand bergzand added the Type: new feature The issue requests / The PR implemements a new feature for RIOT label Jun 11, 2023
@github-actions github-actions bot added Area: build system Area: Build system Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: tests Area: tests and testing framework labels Jun 11, 2023
@bergzand bergzand added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 11, 2023
@riot-ci
Copy link

riot-ci commented Jun 11, 2023

Murdock results

✔️ PASSED

e2e9c0c tests/pkg/mcufont: Initial include of MCUFont test

Success Failures Total Runtime
7923 0 7923 14m:49s

Artifacts

pkg/mcufont/Makefile.dep Outdated Show resolved Hide resolved
input, strlen(input),
&char_callback, NULL);

print_pixbuf();
Copy link
Contributor

@aabadie aabadie Jun 12, 2023

Choose a reason for hiding this comment

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

It would be nice if the message was also displayed on a screen for boards that provide one. The qrcode package test application does that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added something that works (not something great though):

image

@bergzand bergzand removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 12, 2023
@bergzand bergzand added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: no fast fail don't abort PR build after first error and removed CI: no fast fail don't abort PR build after first error labels Jun 12, 2023
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Tested on native and stm32f429i-disc1 and works like a charm. I have a couple of comments.

puts("mcufont package test application");
mf_render_aligned(
&MCUFONT_DISP_TEST_FONT.font,
0, 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to compute coordinates to diplay the test in the center of the screen?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, added a bit that centers the output with respect to the screen size and the string length.

tests/pkg/mcufont/tests/01-run.py Outdated Show resolved Hide resolved
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Some remaining nits. Will test in hardware now

tests/pkg/mcufont/tests/01-run.py Show resolved Hide resolved
tests/pkg/mcufont/tests/01-run.py Outdated Show resolved Hide resolved
@aabadie
Copy link
Contributor

aabadie commented Aug 11, 2023

Will test in hardware now

Still works like a charm (on adafruit- clue). Please squash!

@bergzand
Copy link
Member Author

Squashed and all green

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

ACK

bors merge

bors bot added a commit that referenced this pull request Aug 11, 2023
19726:  mcufont: Initial addition of MCUFont package  r=aabadie a=bergzand

### Contribution description

This adds the MCUFont library as a package to RIOT. Only the decoder part has been packaged. I did not touch the font generation, so the test includes a manually compressed font created via the tooling included in the package.

The included patch files have been submitted as PR upstream in mcufont/mcufont#30

### Testing procedure

Run the test on Native or on any board, The output should be along the lines of:
```
2023-06-11 21:56:40,685 # Help: Press s to start test, r to print it is ready
s
2023-06-11 21:56:42,651 # START
2023-06-11 21:56:42,652 # main(): This is RIOT! (Version: 2023.07-devel-512-g49ee9-pr/mcufont)
2023-06-11 21:56:42,652 # Generated RIOT application: 'mcufont'
2023-06-11 21:56:42,653 #                                                                                                                                 |
2023-06-11 21:56:42,654 #                                                                                                                                 |
2023-06-11 21:56:42,694 #                   █  █                                                                                                          |
2023-06-11 21:56:42,695 #  █     █          █  █                  █████   █    ███   ███████  █                                                           |
2023-06-11 21:56:42,697 #  █     █          █  █                  █    █  █   █   █     █     █                                                           |
2023-06-11 21:56:42,737 #  █     █   ████   █  █   ████           █    █  █  █     █    █     █                                                           |
2023-06-11 21:56:42,739 #  █     █  ██  ██  █  █  ██  ██          █    █  █  █     █    █     █                                                           |
2023-06-11 21:56:42,740 #  ███████  █    █  █  █  █    █          █████   █  █     █    █     █                                                           |
2023-06-11 21:56:42,781 #  █     █  ██████  █  █  █    █          █   █   █  █     █    █     █                                                           |
2023-06-11 21:56:42,782 #  █     █  █       █  █  █    █          █    █  █  █     █    █                                                                 |
2023-06-11 21:56:42,783 #  █     █  ██   █  █  █  ██  ██  █       █    █  █   █   █     █     █                                                           |
2023-06-11 21:56:42,807 #  █     █   ████   █  █   ████   █       █     █ █    ███      █     █                                                           |
2023-06-11 21:56:42,807 # { "threads": [{ "name": "idle", "stack_size": 256, "stack_used": 220 }]}
2023-06-11 21:56:42,808 # { "threads": [{ "name": "main", "stack_size": 1280, "stack_used": 436 }]}
```


### Issues/PRs references

None

Co-authored-by: Koen Zandberg <koen@bergzand.net>
@bors
Copy link
Contributor

bors bot commented Aug 11, 2023

Build failed:

@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 15, 2023
@aabadie
Copy link
Contributor

aabadie commented Aug 15, 2023

bors merge

bors bot added a commit that referenced this pull request Aug 15, 2023
19726:  mcufont: Initial addition of MCUFont package  r=aabadie a=bergzand

### Contribution description

This adds the MCUFont library as a package to RIOT. Only the decoder part has been packaged. I did not touch the font generation, so the test includes a manually compressed font created via the tooling included in the package.

The included patch files have been submitted as PR upstream in mcufont/mcufont#30

### Testing procedure

Run the test on Native or on any board, The output should be along the lines of:
```
2023-06-11 21:56:40,685 # Help: Press s to start test, r to print it is ready
s
2023-06-11 21:56:42,651 # START
2023-06-11 21:56:42,652 # main(): This is RIOT! (Version: 2023.07-devel-512-g49ee9-pr/mcufont)
2023-06-11 21:56:42,652 # Generated RIOT application: 'mcufont'
2023-06-11 21:56:42,653 #                                                                                                                                 |
2023-06-11 21:56:42,654 #                                                                                                                                 |
2023-06-11 21:56:42,694 #                   █  █                                                                                                          |
2023-06-11 21:56:42,695 #  █     █          █  █                  █████   █    ███   ███████  █                                                           |
2023-06-11 21:56:42,697 #  █     █          █  █                  █    █  █   █   █     █     █                                                           |
2023-06-11 21:56:42,737 #  █     █   ████   █  █   ████           █    █  █  █     █    █     █                                                           |
2023-06-11 21:56:42,739 #  █     █  ██  ██  █  █  ██  ██          █    █  █  █     █    █     █                                                           |
2023-06-11 21:56:42,740 #  ███████  █    █  █  █  █    █          █████   █  █     █    █     █                                                           |
2023-06-11 21:56:42,781 #  █     █  ██████  █  █  █    █          █   █   █  █     █    █     █                                                           |
2023-06-11 21:56:42,782 #  █     █  █       █  █  █    █          █    █  █  █     █    █                                                                 |
2023-06-11 21:56:42,783 #  █     █  ██   █  █  █  ██  ██  █       █    █  █   █   █     █     █                                                           |
2023-06-11 21:56:42,807 #  █     █   ████   █  █   ████   █       █     █ █    ███      █     █                                                           |
2023-06-11 21:56:42,807 # { "threads": [{ "name": "idle", "stack_size": 256, "stack_used": 220 }]}
2023-06-11 21:56:42,808 # { "threads": [{ "name": "main", "stack_size": 1280, "stack_used": 436 }]}
```


### Issues/PRs references

None

Co-authored-by: Koen Zandberg <koen@bergzand.net>
@bors
Copy link
Contributor

bors bot commented Aug 15, 2023

Build failed:

@aabadie
Copy link
Contributor

aabadie commented Aug 15, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 16, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 4b1b0a9 into RIOT-OS:master Aug 16, 2023
27 checks passed
@bergzand bergzand deleted the pr/mcufont branch August 16, 2023 08:13
@bergzand
Copy link
Member Author

Thanks!

@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants