xiaoxiang781216 commented on code in PR #16717:
URL: https://github.com/apache/nuttx/pull/16717#discussion_r2205485451


##########
drivers/sensors/nau7802.c:
##########
@@ -89,7 +89,7 @@
 /* ODR to Interval */
 
 static const uint32_t ODR_TO_INTERVAL[] =
-{
+  {

Review Comment:
   why change



##########
drivers/sensors/nau7802.c:
##########
@@ -669,28 +702,28 @@ static int nau7802_control(FAR struct sensor_lowerhalf_s 
*lower,
     }
 
   switch (cmd)
-    {
-    case SNIOC_RESET:
-      err = nau7802_reset(dev);
-      break;
+  {

Review Comment:
   why remove the indent



##########
drivers/sensors/nau7802.c:
##########
@@ -440,10 +442,41 @@ static int nau7802_set_gain(FAR nau7802_dev_s *dev, 
nau7802_gain_e gain)
  * Name: nau7802_set_interval
  ****************************************************************************/
 
-static int nau7802_set_interval(FAR nau7802_dev_s *dev,
-                                      nau7802_odr_e rate)
+static int nau7802_set_interval(FAR struct sensor_lowerhalf_s *lower,
+                                FAR struct file *filep, uint32_t *period_us)
 {
+  FAR nau7802_dev_s *dev = container_of(lower, FAR nau7802_dev_s, lower);
+
+  nau7802_odr_e rate;
+
+  if (*period_us >= 100000)
+    {
+      rate = NAU7802_ODR_10HZ;

Review Comment:
   assign to dev->odr directly and remove rate



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to