Add more getter functions to the commands module
This commit is contained in:
parent
97f17af790
commit
8d521ff46d
4 changed files with 42 additions and 6 deletions
|
@ -16,8 +16,8 @@ pub trait Obd2DataRetrieval: private::Sealed {
|
|||
|
||||
/// Retreive the VIN (vehicle identification number)
|
||||
///
|
||||
/// This should match the number printed on the vehicle, and is a good command for checking
|
||||
/// that the OBD-II interface is working correctly.
|
||||
/// Service 0x09, PID 0x01. This should match the number printed on the vehicle, and is a good
|
||||
/// command for checking that the OBD-II interface is working correctly.
|
||||
fn get_vin(&mut self) -> Result<String>;
|
||||
|
||||
/// Get DTC (diagnostic trouble code) metadata for each ECU
|
||||
|
@ -26,8 +26,21 @@ pub trait Obd2DataRetrieval: private::Sealed {
|
|||
/// Get DTCs for each ECU
|
||||
fn get_dtcs(&mut self) -> Result<Vec<Vec<Dtc>>>;
|
||||
|
||||
/// Get the calculated engine
|
||||
// fn get_engine_load(&mut self) -> Result<u8>;
|
||||
/// Get the calculated engine load (out of 255)
|
||||
fn get_engine_load(&mut self) -> Result<u8>;
|
||||
|
||||
/// Get the temperature of the engine's coolant in ºC
|
||||
fn get_engine_coolant_temperature(&mut self) -> Result<i16>;
|
||||
|
||||
/// Get the fuel pressure in kPa
|
||||
///
|
||||
/// This measurement is gauge pressure (measured relative to the atmosphere)
|
||||
fn get_fuel_pressure(&mut self) -> Result<i16>;
|
||||
|
||||
/// Get the intake manifold pressure in kPa
|
||||
///
|
||||
/// This measurement is absolute pressure.
|
||||
fn get_engine_manifold_pressure(&mut self) -> Result<f32>;
|
||||
|
||||
/// Get the RPM in increments of 0.25
|
||||
fn get_rpm(&mut self) -> Result<f32>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue