dozens of small fixes and improvements, added brownout prevention, adc wip, usb and gamma done