pkg/lora-serialization: add support for lora-serialization format#9863
pkg/lora-serialization: add support for lora-serialization format#9863aabadie merged 1 commit intoRIOT-OS:masterfrom
Conversation
| @@ -0,0 +1 @@ | |||
| USEPKG += lora-serialization | |||
There was a problem hiding this comment.
I know there are already other pkgs in this test application, but embunit can be used outside of the unittests, so can you maybe move them to a separate application?
There was a problem hiding this comment.
Moved it to a separate application.
|
@leandrolanzieri, I don't think unit testing the lora-serialization package within RIOT is required. This is because the library is already unit tested upstream (I saw a tests directory there). |
I think I tend to agree. There should at least be a test application that includes the |
fadbb2c to
fd81c33
Compare
|
I modified the test application, considering the float test cases. Also, a 'real world' example using TTN and openSenseMap can be found here #9862. |
| #include "embUnit.h" | ||
| #include "lora_serialization.h" | ||
|
|
||
| #if defined(BOARD_NATIVE) && !defined(__clang__) |
There was a problem hiding this comment.
with cayenne-lpp we encountered some platform-dependent issues e.g. due to the way floats are handled on different platforms
@miri64 you mean this? I encountered problems with floats while running the test as well.
|
@miri64 Is the test application ok now? |
fd81c33 to
738667b
Compare
|
Yes. Let me run it real quick ;-) |
|
I get an error when compiling with I think this should be fixed upstream |
738667b to
4730e1d
Compare
|
Nice one! I was able to reproduce that. I modified the file upstream. It should be working now. |
|
I guess the last commit has the wrong commit message then ;-) |
|
Works now. Tests (which is the only thing that matters in this PR) are fine with me. @aabadie any word from your side? |
|
|
||
| #include <string.h> | ||
| #include <stdio.h> | ||
| #include "embUnit.h" |
There was a problem hiding this comment.
embUnit is not used by the test application, so this include can be removed.
There was a problem hiding this comment.
Removed the include.
| include ../Makefile.tests_common | ||
|
|
||
| USEPKG += lora-serialization | ||
| USEMODULE += embunit |
There was a problem hiding this comment.
This module is not needed by the test application
There was a problem hiding this comment.
Removed the module.
|
(please remember to squash before merging ;-)) |
@miri64 Do I squash everything to a single commit or keep the one on the tests? |
353085b to
b199036
Compare
|
Squashed the commits to a single one. |
miri64
left a comment
There was a problem hiding this comment.
One last comment, apart from that I tested it on samr21-xpro and native, so ACK.
| @@ -0,0 +1,127 @@ | |||
| /* | |||
There was a problem hiding this comment.
I'm not sure how nitpicky this is, but usually our c-files containing the main functions are called main.c
There was a problem hiding this comment.
Same here, I would prefer a main.c.
aabadie
left a comment
There was a problem hiding this comment.
Found minor remaining things. You can squash and amend directly.
| @@ -0,0 +1 @@ | |||
| USEPKG += lora-serialization | |||
There was a problem hiding this comment.
This file seems useless, is it a leftover from the previous unittest ?
| @@ -0,0 +1,127 @@ | |||
| /* | |||
There was a problem hiding this comment.
Same here, I would prefer a main.c.
| */ | ||
|
|
||
| /** | ||
| * @ingroup unittests |
tests/pkg_lora-serialization: Add test application
b199036 to
f2bda2b
Compare
|
Applied requested changes and squashed. |
aabadie
left a comment
There was a problem hiding this comment.
I've run the test application on native and b-l072z-lrwan1 board., using the test target. It works as expected. Code changes are good now.
Thanks @leandrolanzieri !
ACK
Contribution description
This PR adds support for the lora-serialization format, as a package (found here).
An example showing the lora-serialization format integrated to OpenSenseMap can be found here #9862.
This library is based on this one, but has been implemented withou using dynamic allocation.
This work was done in conjunction with @jia200x.
Testing procedure
Should output: