let usage = b"\
Supported commands:
help Show this help message.
+ ls List recordings.
get REC_ID Retrieve recording.
clear_storage Fully erase the flash's contents.
dump_storage Dump the flash's contents.
self.tx_buf.write(usage);
},
+ Some(b"ls") => self.run_ls(logger),
Some(b"get") => self.run_get(logger, &mut args_iter),
Some(b"clear_storage") => self.run_clear_storage(logger),
Some(b"dump_storage") => self.run_dump_storage(logger),
}
}
+ fn run_ls(&mut self, logger: &mut Logger) {
+ logger.list_recordings(self.tx_buf);
+ }
+
fn run_get(&mut self, logger: &mut Logger, args_iter: &mut ArgumentIter) {
if let Some(recording_id_s) = args_iter.next() {
if let Some(recording_id) = atoi16(recording_id_s) {