Add the remaining service $00 PIDs up to $20
Also restructure the code to implement get_dtcs and get_dtc_info by implementing GetObd2Values on the data types they return. This brings them in line with every other getter function besides get_vin.
This commit is contained in:
parent
5b20ac0ab9
commit
13b9041511
5 changed files with 344 additions and 84 deletions
|
@ -7,6 +7,13 @@ fn main() {
|
|||
let mut device: obd2::Obd2<obd2::device::Elm327> = obd2::Obd2::default();
|
||||
|
||||
println!("VIN: {:?}", device.get_vin());
|
||||
for s in device.get_service_1_pid_support_1().unwrap().iter() {
|
||||
println!("PID support ($01-$20): {:08X}", s);
|
||||
}
|
||||
for s in device.get_service_1_pid_support_2().unwrap().iter() {
|
||||
println!("PID support ($21-$40): {:08X}", s);
|
||||
}
|
||||
|
||||
println!("DTC Info: {:#?}", device.get_dtc_info());
|
||||
|
||||
let dtcs = device.get_dtcs();
|
||||
|
@ -28,6 +35,16 @@ fn main() {
|
|||
device.get_engine_coolant_temperature()
|
||||
);
|
||||
println!("RPM: {:?}", device.get_rpm());
|
||||
println!("Speed: {:?}", device.get_speed());
|
||||
println!("Speed (km/h): {:?}", device.get_speed());
|
||||
println!("Timing Advance (º): {:?}", device.get_timing_advance());
|
||||
println!(
|
||||
"Intake air temp (ºC): {:?}",
|
||||
device.get_intake_air_temperature()
|
||||
);
|
||||
println!("Air flow rate (g/s): {:?}", device.get_air_flow_rate());
|
||||
println!(
|
||||
"Throttle position (%): {:?}",
|
||||
device.get_throttle_position()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue