ccollins476ad commented on a change in pull request #325: MYNEWT-777 SensorAPI: 
Use util/parse pkg instead of using   sensor_shell_stol()
URL: 
https://github.com/apache/incubator-mynewt-core/pull/325#discussion_r121757665
 
 

 ##########
 File path: hw/drivers/sensors/bno055/src/bno055_shell.c
 ##########
 @@ -231,12 +233,14 @@ bno055_shell_cmd_read(int argc, char **argv)
 
     /* Check if more than one sample requested */
     if (argc == 4) {
-        if (sensor_shell_stol(argv[2], 1, UINT16_MAX, &val)) {
+        val = parse_ll_bounds(argv[2], 0, UINT16_MAX, &rc);
+        if (rc) {
             return bno055_shell_err_invalid_arg(argv[2]);
         }
         samples = (uint16_t)val;
 
-        if (sensor_shell_stol(argv[3], 0, UINT16_MAX, &val)) {
+        val = parse_ll_bounds(argv[3], 0, UINT16_MAX, &rc);
+        if (rc) {
             return bno055_shell_err_invalid_arg(argv[2]);
 
 Review comment:
   Should this be argv[3]?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to