Skip to content

Commit

Permalink
Update version to 0.1.22 and remove decode.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdewid committed Mar 2, 2024
1 parent 33d55c5 commit 4f1b0f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "j1939"
version = "0.1.21"
version = "0.1.22"
authors = ["Laixer Equipment B.V. <info@laixer.com>"]
edition = "2021"
repository = "https://github.com/Laixer/J1939"
Expand Down
9 changes: 0 additions & 9 deletions src/decode.rs

This file was deleted.

3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#![deny(warnings)]
#![no_std]

// TODO: Rename to SPN
pub mod decode;

mod name;
mod pgn;
pub mod protocol;
Expand Down
6 changes: 5 additions & 1 deletion src/spn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ impl ElectronicEngineController1Message {
driver_demand: slots::position_level2::dec(pdu[1]),
actual_engine: slots::position_level2::dec(pdu[2]),
rpm: slots::rotational_velocity::dec([pdu[3], pdu[4]]),
source_addr: crate::decode::spn1483(pdu[5]),
source_addr: if pdu[5] != PDU_NOT_AVAILABLE {
Some(pdu[5])
} else {
None
},
starter_mode: EngineStarterMode::from_value(pdu[6]),
}
}
Expand Down

0 comments on commit 4f1b0f7

Please sign in to comment.