-
Notifications
You must be signed in to change notification settings - Fork 14
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
location: cellular: initial support with example application #717
Conversation
Visit the preview URL for this PR (updated for commit 81a7cc0): https://golioth-firmware-sdk-doxygen-dev--pr717-location-cellu-sknxiq39.web.app (expires Sat, 18 Jan 2025 06:19:33 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a9993e61697a3983f3479e468bcb0b616f9a0578 |
Codecov ReportAttention: Patch coverage is
|
ac49c15
to
0cebadd
Compare
ccc2394
to
1f49b15
Compare
19415cc
to
e7e4da3
Compare
1f49b15
to
a0996d7
Compare
Introduce support for Golioth cellular location service. Signed-off-by: Marcin Niestroj <[email protected]>
Add a sample with cellular network cell towers collected over the city trip. This is a playback with configurable speed (1x by default) to quickly see results over time during testing (e.g. on a Grafana map plugin). Signed-off-by: Marcin Niestroj <[email protected]>
Add nRF91 specific cellular tower information fetching and use when requesting location data. Use current cell only for now, as that is the only information provided with the tested modem and SIM card. Leave logs for neighbour cells enabled, so that extending this sample in the future is easy. Signed-off-by: Marcin Niestroj <[email protected]>
Signed-off-by: Marcin Niestroj <[email protected]>
e7e4da3
to
81a7cc0
Compare
if (cell->strength) | ||
{ | ||
ok = zcbor_tstr_put_lit(req->zse, "strength") && zcbor_int32_put(req->zse, cell->strength); | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in #729.
ok = zcbor_map_end_encode(req->zse, 1); | ||
if (!ok) | ||
{ | ||
LOG_ERR("Failed to %s %s encoding", "end", "map"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea here to cut down on the flash size taken up by format strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is right. Such pattern is used sometimes in Zephyr as well, mostly around networking subsystem code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I don't think I'd seen that before. Clever!
ok = zcbor_map_start_encode(req->zse, 1) && zcbor_tstr_put_lit(req->zse, "cell") | ||
&& zcbor_list_start_encode(req->zse, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we're starting and ending these lists, we can do either wifi or cellular, but not both. I think there are usecases for combining them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been addressed in #729.
I bet you already knew I was going to say this, but we need to add tests for the sample as well :) |
Closing in favor of #729 |
No description provided.