feat: IP arg
This commit is contained in:
+13
-1
@@ -8,18 +8,30 @@ use atem_connection_rs::{
|
||||
},
|
||||
};
|
||||
|
||||
use clap::Parser;
|
||||
use color_eyre::Report;
|
||||
use tokio::time::sleep;
|
||||
|
||||
/// ATEM Rust Library Test App
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
struct Args {
|
||||
/// IP of the ATEM to connect to
|
||||
#[arg(short, long)]
|
||||
ip: String,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let args = Args::parse();
|
||||
|
||||
setup_logging().unwrap();
|
||||
|
||||
let switch_to_source_1 = ProgramInput::new(0, 1);
|
||||
let switch_to_source_2 = ProgramInput::new(0, 2);
|
||||
|
||||
let mut atem = AtemSocket::new();
|
||||
atem.connect("127.0.0.1".to_string(), 9910).await.ok();
|
||||
atem.connect(args.ip, 9910).await.ok();
|
||||
|
||||
let mut tracking_id = 0;
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user