Skip to content

Commit

Permalink
more f64, limit thread num
Browse files Browse the repository at this point in the history
  • Loading branch information
gordyf committed Nov 16, 2024
1 parent 0b35133 commit 9b695cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ use pid::Pid;
#[derive(Parser)]
struct Args {
#[arg(short, long)]
setpoint: f32,
setpoint: f64,

#[arg(long, allow_hyphen_values = true)]
kp: f32,
kp: f64,

#[arg(long, allow_hyphen_values = true)]
ki: f32,
ki: f64,

#[arg(long, allow_hyphen_values = true)]
kd: f32,
kd: f64,

#[command(subcommand)]
command: Commands,
Expand All @@ -30,7 +30,7 @@ enum Commands {
Simulate(SimulateArgs),
}

#[tokio::main]
#[tokio::main(flavor = "multi_thread", worker_threads = 2)]
async fn main() {
let args = Args::parse();
let mut pid = Pid::<f64>::new(args.setpoint, 100.0);
Expand Down

0 comments on commit 9b695cf

Please sign in to comment.