kanflo / opendps

Give your DPS5005 the upgrade it deserves
MIT License
895 stars 124 forks source link

Added DPS3003 default parameters and fixed overflow in pwrctl_calc #226

Closed martinstep closed 3 years ago

martinstep commented 3 years ago

The calibration of DPS3003 often resulted in malfunctioning of CC and CL function due to a bug in pwrctl.c:pwrctl_calc_ilimit_adc: The float value in pwrctl_calc_ilimit_adc might result in overflow during the casting to the return value of type uint16_t. The return type is changed to uint32_t.

kanflo commented 3 years ago

Thanks!