-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Viewer] Show X, Y, Z, and N graphs on the Accel/Gyro dashboard at one time #12732
base: development
Are you sure you want to change the base?
[Viewer] Show X, Y, Z, and N graphs on the Accel/Gyro dashboard at one time #12732
Conversation
@@ -83,7 +88,12 @@ namespace rs2 | |||
std::mutex m; | |||
std::atomic<int> stop { false }; | |||
std::thread t; | |||
std::deque<std::pair<float, float>> xy; | |||
|
|||
std::deque< std::pair< float, float > > xy_x_axis; |
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.
Multiple axes members should be in the motion-dashboard class
|
||
void draw_dashboard(ux_window& win, rect& r); | ||
|
||
// Scanning all axes data structures and found optimal dashboard size to show them. | ||
void set_dashboard_size( float & min_x, float & max_x, float & min_y, float & max_y ); |
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.
Should be a virtual function. motion-dashboard class shuould override and calculate based on active axes
@@ -1095,28 +1082,154 @@ void stream_dashboard::draw_dashboard(ux_window& win, rect& r) | |||
{ pos.x + max_y_label_width + 15 + i * (graph_width / ticks_x), pos.y + ImGui::GetTextLineHeight() + 5 + height_y }, ImColor(light_grey)); | |||
} | |||
|
|||
std::sort(xy.begin(), xy.end(), [](const std::pair<float, float>& a, const std::pair<float, float>& b) { return a.first < b.first; }); | |||
std::sort(xy_x_axis.begin(), xy_x_axis.end(), [](const std::pair<float, float>& a, const std::pair<float, float>& b) { return a.first < b.first; }); |
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.
Should have a function that takes a deque + color and plots in the dashboard. frame-drops-dashboard will call once, motion-dashboard will call for active axes.
@@ -994,22 +994,9 @@ void stream_dashboard::draw_dashboard(ux_window& win, rect& r) | |||
auto min_x = 0.f; |
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.
min/max can be members to support separating this to functions that can be overloaded
@@ -994,22 +994,9 @@ void stream_dashboard::draw_dashboard(ux_window& win, rect& r) | |||
auto min_x = 0.f; | |||
auto max_x = 1.f; | |||
auto min_y = 0.f; |
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.
Should check if ImGui functions needs the graph to be normalized to [0,1] range or can we work with actual values (removing divisions to normalize deque values)
Tracked on [LRS-1038]
Implement a possibility to show X, Y, Z, and N lines on the Accel/Gyro dashboard at one time