xiaoxiang781216 commented on code in PR #3686:
URL: https://github.com/apache/nuttx-apps/pull/3686#discussion_r3694496482


##########
system/uorb/Kconfig:
##########
@@ -16,7 +16,11 @@ config UORB_PRIORITY
 
 config UORB_STACKSIZE
        int "stack size"
+       default 4096 if UORB_FORMAT

Review Comment:
   let's change to 4KB always?



##########
system/uorb/listener.c:
##########
@@ -200,15 +200,31 @@ static int listener_create_dir(FAR char *dir, size_t size)
 static int listener_subscribe(FAR struct listen_object_s *tmp,
                               bool nonwakeup)
 {
+  int flags;

Review Comment:
   it's better to let sensor upperhalf layer always return POLLIN for the fetch 
only sensor



##########
system/uorb/listener.c:
##########
@@ -955,6 +957,16 @@ static void listener_monitor(FAR struct listen_list_s 
*objlist,
                        "Giving up. err:%d", timeout, errno);
           break;
         }
+
+      if (interval != 0)
+        {
+          orb_abstime elapsed = orb_absolute_time() - start;
+
+          if (elapsed < (orb_abstime)interval)

Review Comment:
   remove the cast



##########
system/uorb/listener.c:
##########
@@ -913,6 +913,8 @@ static void listener_monitor(FAR struct listen_list_s 
*objlist,
 
   while ((!nb_msgs || nb_recv_msgs < nb_msgs) && !g_should_exit)
     {
+      orb_abstime start = orb_absolute_time();
+
       if (poll(&fds[0], nb_objects, timeout * 1000) > 0)

Review Comment:
   how about let driver return one POLLIN in each interval for fetch only sensor



-- 
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]

Reply via email to