readability improvement and a bug fix

 Added prefixes to constants and global variables
 fixed adjusted current percentage calculation some more
 renamed DAC variables and cleaned up equation