fixed different bugs
added settings saving in flash
processing serial and wireless packets