MCPcopy Index your code
hub / github.com/FrameworkComputer/inputmodule-rs / start_game_cmd

Function start_game_cmd

inputmodule-control/src/inputmodule.rs:381–391  ·  view source on GitHub ↗
(serialdev: &str, game: Game, param: Option<GameOfLifeStartParam>)

Source from the content-addressed store, hash-verified

379}
380
381fn start_game_cmd(serialdev: &str, game: Game, param: Option<GameOfLifeStartParam>) {
382 match (game, param) {
383 (Game::GameOfLife, Some(param)) => {
384 simple_cmd(serialdev, Command::StartGame, &[game as u8, param as u8])
385 }
386 (Game::GameOfLife, None) => {
387 println!("To start Game of Life, provide a --game-param");
388 }
389 (_, _) => simple_cmd(serialdev, Command::StartGame, &[game as u8]),
390 }
391}
392
393fn simple_cmd_multiple(serialdevs: &Vec<String>, command: Command, args: &[u8]) {
394 for serialdev in serialdevs {

Callers 1

serial_commandsFunction · 0.85

Calls 1

simple_cmdFunction · 0.85

Tested by

no test coverage detected