Which event or combination of events sets "HL_FAILURE_FLAG_BATTERY" bit

Towards the end of a flight, I read the message “Bad Battery” on the ground station. This message is very different from warnings. Battery voltage too low is indicated by “Low Battery”, battery capacity too low is indicated by “Low battery capacity”.
I then read in the forum that the message is generated in the Ground Station and is triggered by the “HL_FAILURE_FLAG_BATTERY” bit. Can anyone tell me which event or combination of events sets this bit?