LibreSolar / bms-firmware

Firmware for LibreSolar BMS boards based on bq769x0, bq769x2 or ISL94202
https://libre.solar/bms-firmware/
Apache License 2.0
143 stars 67 forks source link

why alert_mask variable clear at function entry? #76

Open firepooh opened 1 month ago

firepooh commented 1 month ago

hi~

may i question your bms code.

why alert_mask variable clear at function entry?

after exe "ic_conf->alert_mask = 0" no more effect code

any here something else hidden function?

https://github.com/LibreSolar/bms-firmware/blob/ce8b8766e49f4c986b83eab838e92be2ccf91f74/drivers/bms_ic/bq769x2/bq769x2.c#L414

martinjaeger commented 1 month ago

If the alert mask is not cleared, previously set flags will be maintained, which is not desired.