Re: [PATCH v1 09/13] iio: chemical: bme680: Move ambient temperature to attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 11, 2024 at 01:12:21PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 10, 2024 at 11:00:26PM +0200, vamoirid wrote:
> > From: Vasileios Amoiridis <vassilisamir@xxxxxxxxx>
> > 
> > Remove the ambient temperature from being a macro and implement it as
> > an attribute. This way, it is possible to dynamically configure the
> > ambient temperature of the environment to improve the accuracy of the
> > measurements.
> 
> ...
> 
> > -	var1 = (((s32)BME680_AMB_TEMP * calib->par_gh3) / 1000) * 256;
> > +	var1 = (((s32)data->ambient_temp * calib->par_gh3) / 1000) * 256;
> 
> MILLI? KILO?
>

I could do it yes.

> ...
> 
> >  static struct attribute *bme680_attributes[] = {
> >  	&iio_const_attr_oversampling_ratio_available.dev_attr.attr,
> > +	&iio_dev_attr_ambient_temp.dev_attr.attr,
> >  	NULL,
> 
> Side note: Perhaps a patch or an additional change in the existing one to drop
> the trailing comma here.
> 

I could add an additional change if you think it is worth the churn.

> >  };
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

Cheers,
Vasilis




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux