From 4ab593bddbeb17da72546f468953eb638e339e80 Mon Sep 17 00:00:00 2001 From: "Eero.Nurkkala" Date: Mon, 12 Feb 2024 08:37:57 +0200 Subject: [PATCH] multi-hal: Convert: add LIGHT and PRESSURE convertFromSTMSensorData() doesn't currently support light nor pressure events. With this patch, it's possible for Android to receive both events; otherwise, they're completely blocked. Signed-off-by: Eero.Nurkkala --- multi-hal/Convert.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/multi-hal/Convert.cpp b/multi-hal/Convert.cpp index d91a986..7b01da6 100644 --- a/multi-hal/Convert.cpp +++ b/multi-hal/Convert.cpp @@ -289,6 +289,10 @@ void convertFromSTMSensorData(const ::stm::core::ISTMSensorsCallbackData& sensor event.u.uncal.y_bias = sensorData.getData().at(4); event.u.uncal.z_bias = sensorData.getData().at(5); break; + case SensorType::LIGHT: + case SensorType::PRESSURE: + event.u.scalar = sensorData.getData().at(0); + break; case SensorType::META_DATA: event.u.meta.what = V1_0::MetaDataEventType::META_DATA_FLUSH_COMPLETE; break;