Ejemplo n.º 1
0
 /// <summary>
 /// Get all responses
 /// </summary>
 /// <param name="e"></param>
 private void getAllResponses(OdbEventArgs e)
 {
     this.getResponseFor(e.Client, OdbPids.Mode1_VehicleSpeed, data => DataController.Speed = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_EngineRpm, data => DataController.Rpm = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_EngineCoolantTemperature, data => DataController.Temperature = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_EngineCalculatedLoad, data => DataController.EngineLoad = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_MafAirFlowRate, data => DataController.MaxAirFlowRate = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_ThrottlePosition, data => DataController.ThrottlePosition = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_RunTimeSinceEngineStart, data => DataController.Uptime = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_RelativeAcceleratorPedalPosition, data => DataController.AcceleratorPedalPosition = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_EngineOilTemperature, data => DataController.EngineOilTemperature = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_FuelInjectionTiming, data => DataController.FuelInjectionTiming = data);
     this.getResponseFor(e.Client, OdbPids.Mode1_EngineReferenceTorque, data => DataController.EngineReferenceTorque = data);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Trigger on data receive
        /// </summary>
        private void triggerOnDataReceive()
        {
            if (this.DataReceive != null)
            {
                OdbEventArgs args = new OdbEventArgs();
                args.Client = this;

                this.DataReceive.Invoke(this, args);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// On data receive
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void odbClientDataReceive(object sender, OdbEventArgs e)
 {
     if (!this.odbClient.IsConnected)
     {
         ErrorType = BluetoothErrorType.NoDevice;
         IsFinding = false;
         this.Disconnect();
         return;
     }
     if (this.DataReceive != null)
     {
         this.DataReceive.Invoke(this, e);
     }
 }