Implement auto-flash mode

+Auto flash is working but the values need to be tweaked
+CR dem lengthy lines

-Auto flash is hard-coded as on temporarily for debugging