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

double to sensor_val #24051

Closed
GeorgeGkinis opened this issue Apr 2, 2020 · 3 comments
Closed

double to sensor_val #24051

GeorgeGkinis opened this issue Apr 2, 2020 · 3 comments
Labels
area: Sensors Sensors Enhancement Changes/Updates/Additions to existing features

Comments

@GeorgeGkinis
Copy link

Is your feature request related to a problem? Please describe.

I want to convert a double to sensor_val

Describe the solution you'd like
I would like a function double_to_sensor_value the way sensor_value_to_double exists.

Describe alternatives you've considered
Googled allot.

Additional context
None.

@stephanosio stephanosio added area: Sensors Sensors Feature Request A request for a new feature labels Apr 3, 2020
@nashif nashif added Enhancement Changes/Updates/Additions to existing features and removed Enhancement Changes/Updates/Additions to existing features labels Apr 7, 2020
@carlescufi carlescufi added Enhancement Changes/Updates/Additions to existing features and removed Feature Request A request for a new feature labels Apr 14, 2020
@JonBruchim
Copy link

JonBruchim commented Oct 4, 2020

I would like to get assigned to this issue

@saltyJeff
Copy link
Contributor

Any progress made on this? I'm currently using this function as an inline: https://repl.it/@JeffersonLee/zephyr-double-to-sensor-val#main.c

I included the test cases from: https://docs.zephyrproject.org/latest/reference/peripherals/sensor.html#c.sensor_value

@henrikbrixandersen
Copy link
Member

A helper function sensor_value_from_double(struct sensor_value *, double) was added in commit 3c36cd4.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

7 participants