JianyuWang0623 commented on code in PR #15448:
URL: https://github.com/apache/nuttx/pull/15448#discussion_r1905138815
##########
drivers/sensors/gnss_uorb.c:
##########
@@ -173,7 +173,11 @@ static int gnss_activate(FAR struct sensor_lowerhalf_s
*lower,
ret = upper->lower->ops->activate(upper->lower, filep, enable);
}
- if (ret >= 0)
+ if ((upper->crefs == 255 && enable) || (upper->crefs == 0 && !enable))
Review Comment:
> should we check overflow/underflow before activate
@xiaoxiang781216 yes, it`s better, updated.
--
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]