-
Notifications
You must be signed in to change notification settings - Fork 1.4k
dirvers/sensors: add a dynamic sensor debugging tool sensor_monitor #17752
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
base: master
Are you sure you want to change the base?
Conversation
"Sensor procfs - Dynamic sensor debugging tool\n" "\n" "Usage:\n" " cat /proc/sensor_monitor - Show currently monitored topics\n" " echo <level> <topic> > /proc/sensor_monitor - Add topic(s)\n" " echo rm <topic> > /proc/sensor_monitor - Remove topic(s)\n" " echo add <topic> <topic> > /proc/sensor_monitor" " - add/remove topics\n" " echo clean > /proc/sensor_monitor - Remove all topics\n" "\n" "Examples:\n" " echo sensor_accel > /proc/sensor_monitor\n" " echo \"sensor_accel sensor_compass\" > /proc/sensor_monitor\n" " echo \"1 sensor_accel sensor_compass\" > /proc/sensor_monitor\n" " echo \"2 sensor_accel sensor_compass\" > /proc/sensor_monitor\n" " echo \"rm sensor_accel\" > /proc/sensor_monitor\n" " echo \"rm sensor_accel sensor_compass\" > /proc/sensor_monitor\n" " echo clean > /proc/sensor_monitor\n" " echo \"add 1 sensor_a rm sensor_b\" > /proc/sensor_monitor\n" "\n" "Note:\n" " If <level> is not specified, it defaults to 1.\n"; Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
acassis
left a comment
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.
@chenzihan0416 Please include the goldfish board profile with this sensor driver. Also please include in the goldfish profile Documentation the steps that you added in the Testing
|
@chenzihan0416 please explain for someone new to NuttX what "Sensor Monitor feature - a dynamic debugging tool for NuttX sensor subsystem that provides runtime control over sensor logging without requiring system rebuild." means? You explained in high level "WHAT" it is, but it has so many terms that requires more explanation: "dynamic debugging tool", "runtime control", "system rebuild". Please explain for the end user what is the purpose of this driver in simple phrases, what problem is it solving? And why and when the user will want to use it. Currently users can use apps/system/sensortest and apps/system/uorb, please explain the limitation of these existing tool that this sensor monitor can help to solve. |
cederom
left a comment
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.
Thank you @chenzihan0416 very nice feature!! :-)
There are some CI build errors to be fixed please :-)
Also as @acassis noticed some more information would be nice to have in the documentation, with usage examples, and comparison to existing sensor testing tools.. or this is only expansion of control mechanisms to existing ones right? This may not be clear to newcomers but very handy :-)
linguini1
left a comment
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.
Typo in PR title: dirvers -> drivers
Please use the PR title as the commit message as well.
Does this do any operations that explicitly require it to be a kernel module? As in, could this be a stand-alone app in NuttX apps?
Summary
This PR introduces a new Sensor Monitor feature - a dynamic debugging tool for NuttX sensor subsystem that provides runtime control over sensor logging without requiring system rebuild.
Impact
Significantly improves debugging experience for sensor-related issues
No Breaking Changes: Feature is opt-in via Kconfig
Testing
Testing on qemu
Add monitoring topics to sensor_monitor
Delete the monitored topic
Log printing when listening to sensor_accel0