-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
param command updates (change show default and add status) #11200
Conversation
d0aee88
to
540f577
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with changing the semantics, but it also changes 'param show -c' (it should not have an effect in practise though).
|
||
const hrt_abstime rate_limit = 2000 * 1000; // rate-limit saving to 2 seconds | ||
hrt_abstime last_save_elapsed = hrt_elapsed_time(&last_autosave_timestamp); | ||
static constexpr const hrt_abstime rate_limit = 2_s; // rate-limit saving to 2 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static constexpr const
is a bit too much here, no? Does it actually make a difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, in this case it almost certainly not, but I guess the point would be that it's never going to be worse to make something a compile time constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I was just thinking that it hurts readability a bit.
This will likely have to wait until after #11013 for more flash on fmu-v2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
||
const hrt_abstime rate_limit = 2000 * 1000; // rate-limit saving to 2 seconds | ||
hrt_abstime last_save_elapsed = hrt_elapsed_time(&last_autosave_timestamp); | ||
static constexpr const hrt_abstime rate_limit = 2_s; // rate-limit saving to 2 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I was just thinking that it hurts readability a bit.
- add -a option to display all possible system parameters
Rebase on master (should fit in px4_fmu-v2 now). |
These PR contains 2 changes to the param command.
param status
to print status of the param system (current file, memory usage, perf counters)Example
nsh> param status INFO [parameters] summary: 638/1241 (used/total) INFO [parameters] file: /fs/mtd_params INFO [parameters] storage array: 22/32 elements (512 bytes total) INFO [parameters] auto save: on INFO [parameters] last auto save: 3.109 seconds ago param_export: 4 events, 17386us elapsed, 4346.50us avg, min 3598us max 5006us 577.939us rms param_find: 786 events, 7474us elapsed, 9.51us avg, min 3us max 413us 25.181us rms param_get: 14164 events, 94875us elapsed, 6.70us avg, min 3us max 1994us 36.532us rms param_set: 23 events, 347us elapsed, 15.09us avg, min 5us max 27us 6.536us rms