OpenBK7231T_App icon indicating copy to clipboard operation
OpenBK7231T_App copied to clipboard

Incorrect calculations for BL0937 power meter pulses

Open rpv-tomsk opened this issue 8 months ago • 1 comments

https://github.com/openshwprojects/OpenBK7231T_App/blob/59fcf19bbdee45dee56f23e74ac3b8e1cacca5da/src/driver/drv_bl0937.c#L354-L361

I'm sorry if I'm wrong, but for me this code looks incorrect. If we count more pulses due to more ticksElapsed since previous counter reset, the measured value (Voltage,Current, Power) should be less, not greater. Division and multiplication are swapped here.

rpv-tomsk avatar Jun 12 '24 14:06 rpv-tomsk