Skip to content

Commit

Permalink
Automatic reset on download start. No wait for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLafleur committed Oct 1, 2024
1 parent 611ea85 commit 774d0c7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions conUDS/assets/nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,24 @@ nodes:
# just added this for testing, this isn't actually true yet
request_id: 0x111
response_id: 0x112
bmsw0:
request_id: 0x600
response_id: 0x640
bmsw1:
request_id: 0x601
response_id: 0x641
bmsw2:
request_id: 0x602
response_id: 0x642
bmsw3:
request_id: 0x603
response_id: 0x643
bmsw4:
request_id: 0x604
response_id: 0x644
bmsw5:
request_id: 0x605
response_id: 0x645
bmsb:
request_id: 0x610
response_id: 0x650
2 changes: 2 additions & 0 deletions conUDS/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use log::{debug, error, info};
use simplelog::{CombinedLogger, TermLogger, WriteLogger};
use tokio::sync::mpsc;

use conuds::SupportedResetTypes;
use conuds::arguments::{ArgSubCommands, Arguments};
use conuds::modules::canio::CANIO;
use conuds::{CanioCmd, PrdCmd};
Expand Down Expand Up @@ -110,6 +111,7 @@ async fn main() -> Result<()> {
"Downloading binary at '{:#?}' to node `{}`",
dl.binary, args.node
);
uds_client.ecu_reset(SupportedResetTypes::Hard).await;
uds_client.start_persistent_tp().await?;

info!("Waiting for the user to hit enter before continuing with download");
Expand Down

0 comments on commit 774d0c7

Please sign in to comment.