added ability to save settings to stm32f4 flash

some other minor bugfixes
also added preliminary autotuning, not functional yet