[riot-notifications] [RIOT-OS/RIOT] pkg: add qr code generator package (#16462)

Alexandre Abadie notifications at github.com
Sun May 9 12:08:38 CEST 2021


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description

This PR add this [QR code generator project](https://github.com/nayuki/QR-Code-generator) 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.

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->


### Testing procedure

- Green Murdock
- The provided test application works (tested on native and nrf52dk):

<details>

```
$ 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 at 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
```

</details>

<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references

None

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16462

-- Commit Summary --

  * pkg: add qrcode generator package
  * tests: add test application for qrcode package

-- File Changes --

    M pkg/Kconfig (1)
    A pkg/qr-code-generator/Kconfig (9)
    A pkg/qr-code-generator/Makefile (11)
    A pkg/qr-code-generator/Makefile.include (1)
    A pkg/qr-code-generator/doc.txt (11)
    A pkg/qr-code-generator/qr-code-generator.mk (5)
    A tests/pkg_qr-code-generator/Makefile (9)
    A tests/pkg_qr-code-generator/app.config.test (1)
    A tests/pkg_qr-code-generator/main.c (53)
    A tests/pkg_qr-code-generator/tests/01-run.py (48)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16462.patch
https://github.com/RIOT-OS/RIOT/pull/16462.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16462
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210509/72300ccd/attachment.htm>


More information about the notifications mailing list