Adding api support for sensor HAL#8
Open
RajaniRanjan wants to merge 1 commit intoprojectceladon:celadon/r/mr0/stablefrom
Open
Adding api support for sensor HAL#8RajaniRanjan wants to merge 1 commit intoprojectceladon:celadon/r/mr0/stablefrom
RajaniRanjan wants to merge 1 commit intoprojectceladon:celadon/r/mr0/stablefrom
Conversation
083f8f5 to
26fb80e
Compare
JeevakaPrabu
suggested changes
Nov 17, 2021
| 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.
indentation not in line with rest of the files
| 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.
indentation not in line with rest of the files
| 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.
coding style not in line with rest of the files
| return event_count; | ||
| } | ||
|
|
||
| if(!active_sensor_count) { |
There was a problem hiding this comment.
coding style not in line with rest of the files
| * inccase it happen that leads to memory leak | ||
| * and buffer curruption. | ||
| */ | ||
| if(event_count > count) { |
There was a problem hiding this comment.
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.
coding style not in line with rest of the files
| double scale; | ||
| int raw_channel_count; | ||
| struct iio_channel *channel_raw[10]; | ||
| struct iio_channel *channel_frequency;; |
There was a problem hiding this comment.
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: raju.mallikarjun.chegaraddi@intel.com Signed-off-by: rranjan rajani.ranjan@intel.com
0c17e1b to
86eb969
Compare
JeevakaPrabu
approved these changes
Nov 23, 2021
Contributor
Author
|
not required now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: raju.mallikarjun.chegaraddi@intel.com
Signed-off-by: rranjan rajani.ranjan@intel.com