Skip to content

Commit 0542f77

Browse files
committed
error in gain calculation in inline current sense
1 parent 802b478 commit 0542f77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/current_sense/InlineCurrentSense.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ InlineCurrentSense::InlineCurrentSense(float _mVpA, int _pinA, int _pinB, int _p
2525
pinB = _pinB;
2626
pinC = _pinC;
2727

28-
volts_to_amps_ratio = _mVpA / 1000.0f; // mV to amps
28+
volts_to_amps_ratio = 1000.0f / _mVpA; // mV to amps
2929
// gains for each phase
3030
gain_a = volts_to_amps_ratio;
3131
gain_b = volts_to_amps_ratio;

0 commit comments

Comments
 (0)