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

json TOK_FLOAT on nordic builds #79940

Open
neutered opened this issue Oct 16, 2024 · 2 comments
Open

json TOK_FLOAT on nordic builds #79940

neutered opened this issue Oct 16, 2024 · 2 comments
Assignees
Labels
area: JSON bug The issue is a bug, or the PR is fixing a bug

Comments

@neutered
Copy link

Describe the bug

  • What target platform are you using?

nordic nrf9515-dk w/ a mod to the aws_iot example from their 2.7.0 release.

  • What have you tried to diagnose or workaround this issue?

the problem is that TOK_OPAQUE and TOK_FLOAT make the same sort of obj descriptor from the JSON_OBJ_DESCR_xxx macros. this has value have the ‘raw’ value of the float (eg, 0x3e340000 for 0.175 or the address of the opaque thingee) which then gets passed to float_ascii_encode() and then append_bytes() as if were a pointer (it’s not). anyway, i have the naive flaot-to-string running on my local branch but not sure if this goes through nordic or zephyr?

To Reproduce

@neutered neutered added the bug The issue is a bug, or the PR is fixing a bug label Oct 16, 2024
Copy link

Hi @neutered! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

@neutered
Copy link
Author

forgot to attach my naive thing that uses the current opaque / float tie.
json.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: JSON bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

3 participants