mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-28 07:30:54 +03:00
feat: simplify and change configuration (#279)
*breaking change* this changes the configuration syntax, allowing for an unlimited amount of configured clients. Also a first step towards enabling a "save config" feature.
This commit is contained in:
committed by
GitHub
parent
2f6a3629ad
commit
92f652df2e
@@ -8,7 +8,7 @@ use std::time::{Duration, Instant};
|
||||
const FREQUENCY_HZ: f64 = 1.0;
|
||||
const RADIUS: f64 = 100.0;
|
||||
|
||||
#[derive(Args, Debug, Eq, PartialEq)]
|
||||
#[derive(Args, Clone, Debug, Eq, PartialEq)]
|
||||
pub struct TestEmulationArgs {
|
||||
#[arg(long)]
|
||||
mouse: bool,
|
||||
@@ -21,7 +21,7 @@ pub struct TestEmulationArgs {
|
||||
pub async fn run(config: Config, _args: TestEmulationArgs) -> Result<(), InputEmulationError> {
|
||||
log::info!("running input emulation test");
|
||||
|
||||
let backend = config.emulation_backend.map(|b| b.into());
|
||||
let backend = config.emulation_backend().map(|b| b.into());
|
||||
let mut emulation = InputEmulation::new(backend).await?;
|
||||
emulation.create(0).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user