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

pkg: add QR Code generator package #16462

Merged
merged 3 commits into from May 10, 2021

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented May 9, 2021

Contribution description

This PR add this QR Code generator project as a package.

The test application provided simply prints the generated QR code in the terminal and can be scanned with a QR code scanner (tested on Android).

This library could be used with any kind of displays or printers.

Testing procedure

  • Green Murdock
  • The provided test application works (tested on native and nrf52dk):
$ BUILD_IN_DOCKER=1 make -C tests/pkg_qr-code-generator BOARD=nrf52dk flash test IOTLAB_NODE=auto-ssh --no-print-directory 
Launching build container using image "riot/riotbuild:latest".
docker run --rm --tty --user $(id -u) -v '/usr/share/zoneinfo/Europe/Paris:/etc/localtime:ro' -v '/work/riot/RIOT:/data/riotbuild/riotbase:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'      -e 'BOARD=nrf52dk'  -w '/data/riotbuild/riotbase/tests/pkg_qr-code-generator/' 'riot/riotbuild:latest' make 'BOARD=nrf52dk'    
Building application "tests_pkg_qr-code-generator" for "nrf52dk" with MCU "nrf52".

"make" -C /data/riotbuild/riotbase/pkg/qr-code-generator
"make" -C /data/riotbuild/riotbase/build/pkg/qr-code-generator/c -f /data/riotbuild/riotbase/pkg/qr-code-generator/qr-code-generator.mk
"make" -C /data/riotbuild/riotbase/boards/nrf52dk
"make" -C /data/riotbuild/riotbase/boards/common/nrf52xxxdk
"make" -C /data/riotbuild/riotbase/core
"make" -C /data/riotbuild/riotbase/cpu/nrf52
"make" -C /data/riotbuild/riotbase/cpu/cortexm_common
"make" -C /data/riotbuild/riotbase/cpu/cortexm_common/periph
"make" -C /data/riotbuild/riotbase/cpu/nrf52/periph
"make" -C /data/riotbuild/riotbase/cpu/nrf52/vectors
"make" -C /data/riotbuild/riotbase/cpu/nrf5x_common
"make" -C /data/riotbuild/riotbase/cpu/nrf5x_common/periph
"make" -C /data/riotbuild/riotbase/drivers
"make" -C /data/riotbuild/riotbase/drivers/periph_common
"make" -C /data/riotbuild/riotbase/sys
"make" -C /data/riotbuild/riotbase/sys/auto_init
"make" -C /data/riotbuild/riotbase/sys/isrpipe
"make" -C /data/riotbuild/riotbase/sys/malloc_thread_safe
"make" -C /data/riotbuild/riotbase/sys/newlib_syscalls_default
"make" -C /data/riotbuild/riotbase/sys/stdio_uart
"make" -C /data/riotbuild/riotbase/sys/test_utils/interactive_sync
"make" -C /data/riotbuild/riotbase/sys/tsrb
   text	   data	    bss	    dec	    hex	filename
  14616	    128	   2544	  17288	   4388	/data/riotbuild/riotbase/tests/pkg_qr-code-generator/bin/nrf52dk/tests_pkg_qr-code-generator.elf
iotlab-node --jmespath='keys(@)[0]' --format='lambda ret: exit(int(ret))'  --list saclay,nrf52dk,10 --flash /work/riot/RIOT/tests/pkg_qr-code-generator/bin/nrf52dk/tests_pkg_qr-code-generator.bin
r
ssh -t abadie@saclay.iot-lab.info 'socat - tcp:nrf52dk-10.saclay.iot-lab.info:20000' 
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2021.07-devel-202-gc8cfd-pr/pkg/qr-code-generator)
██████████████  ██████████    ██    ██████████████
██          ██  ██    ██      ████  ██          ██
██  ██████  ██  ████    ██  ████    ██  ██████  ██
██  ██████  ██  ████        ██      ██  ██████  ██
██  ██████  ██  ██████████  ████    ██  ██████  ██
██          ██    ██  ██    ████    ██          ██
██████████████  ██  ██  ██  ██  ██  ██████████████
                ██      ██████  ██                
  ████  ██  ████    ██████  ██████  ██  ██████████
  ████    ██  ████████  ██        ████          ██
  ██  ████████  ██  ██  ████                ██████
██████  ██    ██    ██  ██            ██      ██  
          ████████  ██  ██        ██████  ██  ████
  ██          ████    ██  ██    ██████    ██    ██
██    ██    ██    ████████        ██  ██    ██████
  ██    ████  ████    ██        ██  ██  ██    ██  
██      ██  ██████          ████████████████      
                ██████    ██  ████      ████  ████
██████████████  ████████  ████████  ██  ████  ████
██          ██    ██  ██████    ██      ████    ██
██  ██████  ██  ██████████      ████████████    ██
██  ██████  ██    ████  ██  ██        ████████    
██  ██████  ██  ██  ████      ██  ██    ██      ██
██          ██  ████    ██████████      ████  ██  
██████████████          ██      ██  ████      ████

SUCCESS

Issues/PRs references

None

@aabadie aabadie added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 9, 2021
@aabadie aabadie changed the title pkg: add qr code generator package pkg: add QR Code generator package May 9, 2021
@aabadie
Copy link
Contributor Author

aabadie commented May 10, 2021

Just pushed a941fe5 to extend the test application with the disp_dev API. It's a bit slow (print pixel by pixel...) but works well (tested on adafruit-clue and stm32f429i-disc1 boards.

@leandrolanzieri
Copy link
Contributor

I've tested the application on a stm32f429i-disco and works like a charm:
qr_riot

@aabadie
Copy link
Contributor Author

aabadie commented May 10, 2021

@leandrolanzieri, I added your suggestions.

@leandrolanzieri leandrolanzieri added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels May 10, 2021
@leandrolanzieri leandrolanzieri added this to the Release 2021.07 milestone May 10, 2021
Copy link
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

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

Integration looks good and the test is passing. ACK!

@leandrolanzieri leandrolanzieri merged commit 0c3ece3 into RIOT-OS:master May 10, 2021
@aabadie aabadie deleted the pr/pkg/qr-code-generator branch May 10, 2021 14:33
@aabadie
Copy link
Contributor Author

aabadie commented May 10, 2021

Thanks @leandrolanzieri for the quick review and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines 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.

None yet

2 participants