Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177971
b: refs/heads/master
c: 4235f68
h: refs/heads/master
i:
  177969: d9d9d7d
  177967: a8ce498
v: v3
  • Loading branch information
Jonathan Cameron authored and Jean Delvare committed Dec 16, 2009
1 parent 7558c7d commit a44d649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70c38772aef27b01dc236fb4016261c3828df6aa
refs/heads/master: 4235f684b66d6f00d2cd8849c884cf8f8b57ecad
6 changes: 3 additions & 3 deletions trunk/drivers/hwmon/sht15.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static inline int sht15_calc_temp(struct sht15_data *data)
int d1 = 0;
int i;

for (i = 1; i < ARRAY_SIZE(temppoints) - 1; i++)
for (i = 1; i < ARRAY_SIZE(temppoints); i++)
/* Find pointer to interpolate */
if (data->supply_uV > temppoints[i - 1].vdd) {
d1 = (data->supply_uV/1000 - temppoints[i - 1].vdd)
Expand All @@ -332,12 +332,12 @@ static inline int sht15_calc_humid(struct sht15_data *data)

const int c1 = -4;
const int c2 = 40500; /* x 10 ^ -6 */
const int c3 = 2800; /* x10 ^ -9 */
const int c3 = -2800; /* x10 ^ -9 */

RHlinear = c1*1000
+ c2 * data->val_humid/1000
+ (data->val_humid * data->val_humid * c3)/1000000;
return (temp - 25000) * (10000 + 800 * data->val_humid)
return (temp - 25000) * (10000 + 80 * data->val_humid)
/ 1000000 + RHlinear;
}

Expand Down

0 comments on commit a44d649

Please sign in to comment.