xiaoxiang781216 commented on code in PR #20567:
URL: https://github.com/apache/nuttx/pull/20567#discussion_r4231769130
##########
include/nuttx/uorb.h:
##########
@@ -648,11 +648,23 @@
#define SENSOR_TYPE_CHARGE 65
+/* Inclinometer
+ * A sensor of this type returns the static inclination (tilt) of the
+ * device X, Y and Z axes relative to the horizontal plane, derived from
+ * the gravity vector. Each value is in degrees and signed, in the range
Review Comment:
why not reuse sensor_rotation? it's important to report the same data with
the same physical measement.
##########
include/nuttx/sensors/ioctl.h:
##########
@@ -264,6 +264,20 @@
#define SNIOC_SET_MOVING_AVG _SNIOC(0x006e)
+/* IOCTL commands unique to SCL3300 */
+
+/* Command: SNIOC_SET_OPERATIONAL_MODE
+ * Description: Select the operation mode
+ * Reuse from ISL29023
+ * Arg: enum scl3300_mode_e by value
+ */
+
+/* Command: SNIOC_SET_POWER_MODE
+ * Description: Select the idle power policy
+ * Reuse from LIS3DH
+ * Arg: enum scl3300_power_e by value
+ */
Review Comment:
but where they defined
##########
drivers/sensors/sensor.c:
##########
@@ -231,6 +231,7 @@ static const struct sensor_meta_s g_sensor_meta[] =
{sizeof(struct sensor_conductivity), "conductivity"},
{sizeof(struct sensor_energy), "energy"},
{sizeof(struct sensor_charge), "charge"},
+ {sizeof(struct sensor_inclinometer), "inclinometer"},
Review Comment:
move to first patch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]