private void ProximityReceived_Handler(object sender, IProximityEventArgs e) { var message = $"Proximity Received - Raw Value {e.RawValue} & Approximate Distance in mm {e.Proximity:F3}"; UpdateProximityMessageBox(message).Wait(); _logInfoAction(message); }
private void ProximityReceived_HandlerArduino(object sender, IProximityEventArgs e) { var message = $"Proximity Received - Raw Value {e.RawValue} & Approximate Distance in mm {e.Proximity:F3}"; UpdateUIAsync(() => sonarMessages.Text = message).Wait(); _logInfoAction(message); }
private void ProximityReceived_Handler(object sender, IProximityEventArgs e) { var message = $"Proximity Received - Raw Value {e.RawValue} & Approximate Distance in mm {e.Proximity:F3}"; _logInfoAction(message); lock (_lock) { MessageObject.Error = null; MessageObject.ProximitySensorRaw = e.RawValue; MessageObject.ProximitySensorDistance = e.Proximity; PostMessageToAPI(); } }
private void Sensor_ProximityReceived(object sender, IProximityEventArgs e) { var message = $"Sonar Result Received {e.RawValue} Distance {e.Proximity} mm"; UpdateUIAsync(() => sonarMessages.Text = message).Wait(); }