Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Attribute offset and sampling_frequency data type is not consistent #2352

Open
guchaojie opened this issue Nov 11, 2016 · 0 comments
Open

Attribute offset and sampling_frequency data type is not consistent #2352

guchaojie opened this issue Nov 11, 2016 · 0 comments

Comments

@guchaojie
Copy link
Contributor

guchaojie commented Nov 11, 2016

In iio.json file, offset data type definition is double
In sol_iio_channel struct, offset data type definition is int
eg:
root@raspberrypi3:/sys/bus/iio/devices/iio:device1# cat in_temp_offset
-4368
So offset should be fixed by int data type.

In iio.json and sol_iio_config, sampling_frequency data type definition is int.
According to investigation, sampling_frequency sometimes be int , sometimes be double
eg:
root@raspberrypi3:/sys/bus/iio/devices/iio:device0# ls
buffer in_anglvel_x_scale in_anglvel_z_scale sampling_frequency_available uevent
dev in_anglvel_y_raw name scan_elements
in_anglvel_scale_available in_anglvel_y_scale power subsystem
in_anglvel_x_raw in_anglvel_z_raw sampling_frequency trigger
root@raspberrypi3:/sys/bus/iio/devices/iio:device0# cat sampling_frequency
100

root@raspberrypi3:/sys/bus/iio/devices/iio:device2# ls
buffer in_magn_sampling_frequency in_magn_z_raw scale_available uevent
dev in_magn_scale name scan_elements
in_magn_meas_conf in_magn_x_raw power subsystem
in_magn_meas_conf_available in_magn_y_raw sampling_frequency_available trigger
root@raspberrypi3:/sys/bus/iio/devices/iio:device2# cat in_magn_sampling_frequency
10.000000
root@raspberrypi3:/sys/bus/iio/devices/iio:device2# cat sampling_frequency_available
0.500000 1.0 2.0 5.0 10.0 20.0 50.0

So I think sampling_frequency should be double.

@guchaojie guchaojie changed the title Attribute offset and sampling_frequency is not consistent Attribute offset and sampling_frequency data type is not consistent Nov 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant