Adds a name and a randid when saving a VP
This commit is contained in:
parent
cbbea4dcd8
commit
dfd5577cbc
|
|
@ -23,6 +23,7 @@ colog = "1.3.0"
|
|||
env_logger = "0.11.5"
|
||||
log = { version = "0.4.22", features = ["serde", "std", "release_max_level_debug", "max_level_debug"] }
|
||||
rand = { version = "0.8.5", features = ["small_rng"] }
|
||||
mockall = "0.13.1"
|
||||
|
||||
[[bin]]
|
||||
name = "rusty_midicommander"
|
||||
|
|
|
|||
|
|
@ -48,16 +48,15 @@ pub struct CLIArgs {
|
|||
/// Create a config file from all the given arguments
|
||||
#[arg(short, long)]
|
||||
pub save: Option<String>,
|
||||
// /// Connect to a VP
|
||||
// #[command(subcommand)]
|
||||
// pub vp: Vec<VPType>,
|
||||
|
||||
/// Connect to a VP
|
||||
pub vp: Vec<VPType>,
|
||||
}
|
||||
|
||||
/// All arguments for creating a VP configuration
|
||||
#[derive(Debug, Parser, Serialize, Deserialize)]
|
||||
pub struct CreateArgs {
|
||||
/// Create a projector config file of a specific type
|
||||
#[command(subcommand)]
|
||||
pub create: VPType,
|
||||
|
||||
/// The name to save it under
|
||||
|
|
@ -135,6 +134,7 @@ impl RMCArgs {
|
|||
midi_interface: _,
|
||||
config: _,
|
||||
save: Some(save_path),
|
||||
vp: _,
|
||||
},
|
||||
),
|
||||
} = &self
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
pub mod panasonic;
|
||||
pub mod proj_traits;
|
||||
|
||||
use clap::Parser;
|
||||
use clap::ValueEnum;
|
||||
use panasonic::PanasonicProjector;
|
||||
pub use proj_traits::{AdvancedCommands, GenericProjector};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Enumerate all the VP types
|
||||
#[derive(Parser, Serialize, Deserialize, Clone, Debug)]
|
||||
#[derive(ValueEnum, Serialize, Deserialize, Clone, Debug)]
|
||||
pub enum VPType {
|
||||
/// A panasonic VideoProjector
|
||||
Panasonic,
|
||||
|
|
|
|||
Reference in New Issue