-
Notifications
You must be signed in to change notification settings - Fork 4
Adding api support for sensor HAL #8
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
base: celadon/r/mr0/stable
Are you sure you want to change the base?
Adding api support for sensor HAL #8
Conversation
083f8f5 to
26fb80e
Compare
rajucm2007
left a comment
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.
Looks Good to me
JaikrishnaNemallapudi
left a comment
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.
LGTM
| unsigned int nb_iio_devices = iio_context_get_devices_count(ctx); | ||
|
|
||
| for (int i = 0; i < nb_iio_devices; i++) { | ||
| const struct iio_device *device = iio_context_get_device(ctx, i); |
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.
indentation not in line with rest of the files
iio-client.cpp
Outdated
| if (nb_channels > 0) { | ||
| sensorCount++; | ||
| const char *sensor_name = iio_device_get_name(device); | ||
| int handle = get_android_sensor_id_by_name(sensor_name); |
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.
indentation not in line with rest of the files
iio-client.cpp
Outdated
| unsigned int attrs_count = iio_channel_get_attrs_count(channel); | ||
| for (int attr_index = 0; attr_index < attrs_count; attr_index++) { | ||
| const char* attr_name = iio_channel_get_attr(channel, attr_index); | ||
| if(attr_name && !strcmp(attr_name, "raw")) { |
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.
coding style not in line with rest of the files
iio-client.cpp
Outdated
| return event_count; | ||
| } | ||
|
|
||
| if(!active_sensor_count) { |
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.
coding style not in line with rest of the files
iio-client.cpp
Outdated
| * inccase it happen that leads to memory leak | ||
| * and buffer curruption. | ||
| */ | ||
| if(event_count > count) { |
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.
coding style not in line with rest of the files
| continue; | ||
| } | ||
| /* Convert time from ns to us and keep min time 1000us */ | ||
| int64_t sampling_period_us = sampling_period_ns/1000; |
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.
coding style not in line with rest of the files
iio-client.h
Outdated
| double scale; | ||
| int raw_channel_count; | ||
| struct iio_channel *channel_raw[10]; | ||
| struct iio_channel *channel_frequency;; |
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.
remove 1 extra ;
coding style not in line with rest of the files
Indentation issues. please check the whole file for indentation issues
6d780b4 to
fc267fa
Compare
adding api support for sensor HAL. poll batch activate flush setDelay - is depricated in Hal version 1.3 and will not be called by fwk any more. where as setDelay functionalities are handled by batch api Tracked-On: OAM-99160 Signed-off-by: [email protected] Signed-off-by: rranjan [email protected]
0c17e1b to
86eb969
Compare
|
not required now |
adding api support for sensor HAL.
poll
batch
activate
flush
setDelay - is depricated in Hal version 1.3 and
will not be called by fwk any more. where as
setDelay functionalities are handled by batch api
Tracked-On:OAM-99160
Signed-off-by: [email protected]
Signed-off-by: rranjan [email protected]