First version with both single-shot and continuous-scan modes