Skip to content

Conversation

@RajaniRanjan
Copy link
Contributor

@RajaniRanjan RajaniRanjan commented Nov 8, 2021

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]

@RajaniRanjan RajaniRanjan force-pushed the sensors_ccb branch 3 times, most recently from 083f8f5 to 26fb80e Compare November 16, 2021 06:14
@RajaniRanjan RajaniRanjan changed the base branch from master to celadon/r/mr0/stable November 16, 2021 06:17
Copy link

@rajucm2007 rajucm2007 left a 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

Copy link
Contributor

@JaikrishnaNemallapudi JaikrishnaNemallapudi left a 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);

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);

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")) {

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) {

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) {

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;

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;;

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

@RajaniRanjan RajaniRanjan force-pushed the sensors_ccb branch 3 times, most recently from 6d780b4 to fc267fa Compare November 18, 2021 06:01
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]
@RajaniRanjan RajaniRanjan force-pushed the sensors_ccb branch 2 times, most recently from 0c17e1b to 86eb969 Compare November 23, 2021 05:13
@RajaniRanjan
Copy link
Contributor Author

not required now

@RajaniRanjan RajaniRanjan reopened this Jan 4, 2022
@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale Stale label for inactive open prs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants