-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
There is an accidental rounding in the getCurrent function.
to fix this you can use this code to get values between full mA
float Sensor_INA3221_Class::getCurrent(ina3221_ch_t channel) {
int32_t shunt_uV = 0;
float current_A = 0;
shunt_uV = getShuntVoltage(channel);
current_A = ((float) shunt_uV) / ((int32_t)_shuntRes[channel]) / 1000.0f; // <- here previously the value was rounded needlessly
return current_A;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels