Skip to content

Commit

Permalink
[CLI] Add the .env file and get the pid-linear from env
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVyM committed Nov 28, 2023
1 parent a8da705 commit c19a7e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MQTT_SERVER=localhost:4242
SPEED_LIMIT_MIN=42
SPEED_LIMIT_MAX=42
WHEEL_DIAMETER=42
WHEEL_GAPS=42
LIDAR_POSE=42
LIDAR_RESOLUTION=42
PID_LINEAR="1 2 3 4 5 6"
4 changes: 2 additions & 2 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ pub struct Args {
pub wheel_gaps: u16,

/// The value Kp Ki Kd rho theta phi
#[clap(long, value_parser, num_args = 6, value_delimiter = ' ', env)]
pub pid_linear: Vec<u8>,
#[clap(long, env, value_parser, num_args = 6, value_delimiter = ' ')]
pub pid_linear: Vec<f32>,

/// TODO: Add argument
#[arg(long, env)]
Expand Down

0 comments on commit c19a7e7

Please sign in to comment.