This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 02ba3229954 include/nuttx/uorb.h: use sensor_data_t for sensor_eng 
voltage
02ba3229954 is described below

commit 02ba32299541a65389d40a31911544636a754704
Author: Brijesh Thakkar <[email protected]>
AuthorDate: Sun Nov 8 16:09:50 2026 +0530

    include/nuttx/uorb.h: use sensor_data_t for sensor_eng voltage
    
    All members of the sensor structures use sensor_data_t except
    sensor_eng.voltage, which is a plain float. With SENSORS_USE_B16 every
    other sensor value is a b16_t, so this member does not follow the
    configured data type.
    
    Use sensor_data_t as for the other members. No change for float builds.
    
    Assisted-by: Claude:claude-sonnet-5-5
    Signed-off-by: Brijesh Thakkar <[email protected]>
---
 include/nuttx/uorb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/nuttx/uorb.h b/include/nuttx/uorb.h
index 9bdaa2bab87..58830dc1c84 100644
--- a/include/nuttx/uorb.h
+++ b/include/nuttx/uorb.h
@@ -1099,7 +1099,7 @@ struct sensor_cap           /* Type: Capacitance */
 struct sensor_eng           /* Type: ENG */
 {
   uint64_t timestamp;       /* Unit is microseconds */
-  float voltage[4];         /* Voltage unit in mV */
+  sensor_data_t voltage[4]; /* Voltage unit in mV */
   uint32_t stat;            /* Status. bit3:0 - value 3:0 is valid or not */
 };
 

Reply via email to