manuelbl / zy12pdn-oss

Open-Source Firmware for ZY12PDN USB Power Delivery Trigger
MIT License
204 stars 28 forks source link

Fix max current error #6

Closed Leseratte10 closed 2 years ago

Leseratte10 commented 2 years ago

I have absolutely no experience with this module so maybe this change I'm requesting is wrong - if it is, sorry for wasting your time.

But this code for non-PD USB2 support looks wrong, it first sets active_voltage to 5000 (5 V), and then immediately afterwards it sets active_voltage down to 900 (900 mV).

This looks a lot like a typo and the code was supposed to set active_max_current to 900 (900 mA) instead.

manuelbl commented 2 years ago

Looks like a bug indeed. I will test and integrate it.

manuelbl commented 2 years ago

Thanks. I've integrated it.