-
Notifications
You must be signed in to change notification settings - Fork 4.9k
added gyro and accel graph #13849
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
added gyro and accel graph #13849
Conversation
Noy-Zini
commented
Mar 13, 2025
Can you send a build on team so I can play with? and add the new UI screenshot this this PR description? Tnx |
7441483
to
5428476
Compare
common/graph-model.cpp
Outdated
{ | ||
double ts = glfwGetTime(); | ||
|
||
if (ts - _last_time > _update_rate) |
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.
Consider using rsutils::time::periodic_timer
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 made the change to rsutils::time::periodic_timer
, its more intuitive.
bool _paused = false; | ||
|
||
const int VECTOR_SIZE = 300; | ||
std::vector< float > _x_history, _y_history, _z_history, _n_history; |
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.
Why not using an std::queue ?
You are using the vector as a queue right?
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.
You're right but I used std::vector as a queue because ImPlot::PlotLine function requires const T* xs
and const T* ys
, which means it needs direct access to the underlying array. With std::vector, I can simply use .data() to get a raw pointer to the data. I can't do that with, std::queue unless I use conversions.
@@ -792,6 +839,21 @@ namespace rs2 | |||
if (show_metadata) | |||
stream_model::draw_stream_metadata(timestamp, timestamp_domain, frame_number, profile, original_size, stream_rect); | |||
|
|||
if (show_graph) | |||
{ | |||
if (dev->is_paused() || (p && p.current_status() == RS2_PLAYBACK_STATUS_PAUSED)) |
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.
2 questions.
- Did you test with D555 Eth mode?
- Did you test playback mode?
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.
- Made the test, in this case this option is not shown (the button isn't displayed) right now, we can add that in the future.
- It works