Skip to content

Commit

Permalink
[CLI] Add the argument mqtt_client_name
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVyM committed Nov 29, 2023
1 parent 0b80c2e commit ab9eb62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MQTT_MAIN_TOPIC=robot
MQTT_CLIENT_NAME=Wall-e
MQTT_SERVER=localhost:4242
SPEED_LIMIT_MIN=42
SPEED_LIMIT_MAX=42
Expand Down
5 changes: 5 additions & 0 deletions src/cli/ressources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ pub struct Args {
#[arg(long, env, value_parser, num_args= 1.., value_delimiter = ' ')]
pub mqtt_server: Vec<String>,

/// The client name of the mqtt connection
/// (Same for every broker)
#[arg(long, env)]
pub mqtt_client_name: String,

/// The main topic on the broker
#[arg(long, env)]
pub mqtt_main_topic: String,
Expand Down

0 comments on commit ab9eb62

Please sign in to comment.