Skip to content

Commit

Permalink
Add core connections credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoZua95LT committed Jul 24, 2024
1 parent 41c1a82 commit 424ff06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bin/sailtrack-kalman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ fn main() {
let filter_mutex = Arc::new(Mutex::new(filter));

// TODO: Add username and password authentication
let mqqt_opts = MqttOptions::new("sailtrack-kalman", "localhost", 1883);
// mqqt_opts.set_credentials("mosquitto", "sailtrack");
let mut mqqt_opts = MqttOptions::new("sailtrack-kalman", "192.168.42.1", 1883);
mqqt_opts.set_credentials("mosquitto", "sailtrack");

let (client, mut connection) = Client::new(mqqt_opts, 10);
client.subscribe("sensor/gps0", QoS::AtMostOnce).unwrap();
Expand Down Expand Up @@ -503,7 +503,7 @@ fn main() {
};
client
.publish(
"boat/kalman",
"boat",
QoS::AtLeastOnce,
false,
serde_json::to_vec(&message).unwrap(),
Expand Down

0 comments on commit 424ff06

Please sign in to comment.