You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "raiden00pl (via GitHub)" <gi...@apache.org> on 2026/03/16 12:52:30 UTC
[PR] examples/nxscope: control stream interval from CLI [nuttx-apps]
raiden00pl opened a new pull request, #3426:
URL: https://github.com/apache/nuttx-apps/pull/3426
## Summary
add the ability to control the nxscope example stream interval from the CLI which is useful for performance testing
## Impact
a new function useful
## Testing
tested on qemu-intel64:
```
NuttShell (NSH) NuttX-12.12.0
nsh> nxscope -h
ERROR: unsupported argument
Usage: nxscope [-i <stream_interval_us>]
[-m <main_interval_us>]
nsh> nxscope -i 10 -m 100
stream interval = 10
main interval = 100
nxscope_samples_thr
nxscope_charlog_thr
nxscope_crichan_thr
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] examples/nxscope: control stream interval from CLI [nuttx-apps]
Posted by "cederom (via GitHub)" <gi...@apache.org>.
cederom commented on code in PR #3426:
URL: https://github.com/apache/nuttx-apps/pull/3426#discussion_r2941081549
##########
examples/nxscope/nxscope_main.c:
##########
@@ -93,12 +97,76 @@ static int nxscope_cb_start(FAR void *priv, bool start)
return OK;
}
+/****************************************************************************
+ * Name: nxscope_show_usage
+ ****************************************************************************/
+
+static void nxscope_show_usage(FAR const char *progname)
+{
+ printf("Usage: %s [-i <stream_interval_us>]\n", progname);
+ printf(" [-m <main_interval_us>]\n");
+}
+
+/****************************************************************************
+ * Name: nxscope_parse_args
+ ****************************************************************************/
+
+static int nxscope_parse_args(int argc, FAR char *argv[],
+ FAR int *stream_interval,
+ FAR int *main_interval)
+{
+ unsigned long value = 0;
+ int opt = 0;
+
+ DEBUGASSERT(argv);
+ DEBUGASSERT(stream_interval);
+ DEBUGASSERT(main_interval);
+
+ while ((opt = getopt(argc, argv, "i:m:")) != -1)
Review Comment:
isn't `h` supported help trigger? :-)
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] examples/nxscope: control stream interval from CLI [nuttx-apps]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #3426:
URL: https://github.com/apache/nuttx-apps/pull/3426
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org