Skip to content

Conversation

@Tamir91
Copy link
Contributor

@Tamir91 Tamir91 commented Mar 6, 2024

Tracked on [LRS-1038]
Implement a possibility to show X, Y, Z, and N lines on the Accel/Gyro dashboard at one time

image

@Tamir91 Tamir91 requested a review from OhadMeir March 6, 2024 08:52
std::thread t;
std::deque<std::pair<float, float>> xy;

std::deque< std::pair< float, float > > xy_x_axis;
Copy link
Contributor

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 );
Copy link
Contributor

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

}

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; });
Copy link
Contributor

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.


void stream_dashboard::draw_dashboard(ux_window& win, rect& r)
{
auto min_x = 0.f;
Copy link
Contributor

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

{
auto min_x = 0.f;
auto max_x = 1.f;
auto min_y = 0.f;
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants