diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2024-03-11 11:29:26 +0100 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2024-03-11 11:29:26 +0100 |
| commit | d993980f4713ec05807f55ca88c1f0608a290417 (patch) | |
| tree | 58b1a7f5febdf9e3008c8d31735d8368b11aeeb8 | |
| parent | 4d7f9a81bbe3567d8a9ce709e5d879f7ca362ac2 (diff) | |
| -rwxr-xr-x | ina260.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -169,8 +169,7 @@ static ssize_t attr_metric_show(struct kobject *_kobj, if(INA260_IS_ATTR(power)){ if(ina260_read_register(cdata, INA260_REG_POWER,&rvalue)) return -1; - op1=10*rvalue; - return sprintf(buf, "%d.%d\n", op1/1000,(op1) % 1000); + return sprintf(buf, "%d\n", 10*rvalue); } else if(INA260_IS_ATTR(voltage)){ if(ina260_read_register(cdata, INA260_REG_VOLTAGE,&rvalue)) return -1; |
