Browse Source

ina219: fix shift value (#2577)

According to the datasheet, ADC gain bits are [11...12]
pull/2578/merge
HamedTa 1 year ago
committed by GitHub
parent
commit
0db47f5ec9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/sensors/INA219Sensor.h

+ 1
- 1
code/espurna/sensors/INA219Sensor.h View File

@ -258,7 +258,7 @@ private:
value |= (conf.bus_mode << 7) | (conf.shunt_mode << 3);
value &= ~GainMask;
value |= (conf.gain << 12);
value |= (conf.gain << 11);
value &= ~BusRangeMask;
value |= (conf.bus_range << 13);


Loading…
Cancel
Save