Skip to content

Commit

Permalink
Merge pull request #273 from hans-tseng/master
Browse files Browse the repository at this point in the history
 1. fix the wrong display value of PSU
  • Loading branch information
jnealtowns committed Dec 12, 2017
2 parents da4c870 + 2e7c988 commit 3f95ea0
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ static ssize_t for_vout_data(struct device *dev, struct device_attribute \
exponent = two_complement_to_int(data->vout_mode, 5, 0x1f);
mantissa = data->v_out;

return (exponent > 0) ? sprintf(buf, "%d\n", \
(mantissa << exponent) * multiplier) : \
sprintf(buf, "%d\n", (mantissa << exponent) / (1 << -exponent));
return (exponent > 0) ? \
sprintf(buf, "%d\n", mantissa * multiplier * (1 << exponent)) : \
sprintf(buf, "%d\n", mantissa * multiplier / (1 << -exponent));

}

Expand Down
Loading

0 comments on commit 3f95ea0

Please sign in to comment.