Atrix inaccurate battery reading

Given that I use a lot of knock-off Chinese batteries and have tweaked a lot of things, I thought the wildly inaccurate battery readings I was getting on my Atrix probably wouldn’t get fixed.  Rebooting was a temporary fix, and I’d often get back 60-80% battery by restarting after going down to 15% in just a few hours, only to have to reboot again.  xda-developers, as always, to the rescue.  Completely fixed my problem, all hail open source and the community.  Motorola Atrix battery level fix.