Fix buffer length
Main: Factor out sample parsing
Commands: Add setAdcTriggerMode command