Skip to content

Commit cbfadb0

Browse files
vigneshraja123717root
authored andcommitted
corrected review comments
1 parent d55ad07 commit cbfadb0

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

cli/graph.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ int eye_plot_graph(int *data, bool plot_6p_points, unsigned int w2h_score)
410410
snprintf(legend, sizeof(legend), "W2H SCORE = %u", w2h_score);
411411

412412
if (plot_6p_points == true)
413-
mvprintw(0, COLS - strlen(legend) - 1, "%s", legend);
413+
{
414+
mvprintw(0, COLS - strlen(legend) - 1, "%s", legend);
415+
}
414416

415417
//Adjusting the eye points to plot from 0 to 42 for x-axis and 0 t0 100 for Y-axis
416418
//as ncurses library did not support negative ploting
@@ -421,24 +423,24 @@ int eye_plot_graph(int *data, bool plot_6p_points, unsigned int w2h_score)
421423

422424
if(plot_6p_points == true)
423425
{
424-
data[4] = data[4] + Y_LAYOUT_SHIFT;
425-
data[5] = data[5] + Y_LAYOUT_SHIFT;
426+
data[4] = data[4] + Y_LAYOUT_SHIFT;
427+
data[5] = data[5] + Y_LAYOUT_SHIFT;
426428
}
427429

428430
plot_point(data[0] + Y_PRINT_OFFSET, Y_LAYOUT_SHIFT + X_PRINT_OFFSET);
429431
plot_point(data[1] + Y_PRINT_OFFSET, Y_LAYOUT_SHIFT + X_PRINT_OFFSET);
430432

431433
if(plot_6p_points == true)
432434
{
433-
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) - 3, data[2] + X_PRINT_OFFSET);
434-
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) - 3, data[3] + X_PRINT_OFFSET);
435-
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) + 3, data[4] + X_PRINT_OFFSET);
436-
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) + 3, data[5] + X_PRINT_OFFSET);
435+
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) - 3, data[2] + X_PRINT_OFFSET);
436+
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) - 3, data[3] + X_PRINT_OFFSET);
437+
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) + 3, data[4] + X_PRINT_OFFSET);
438+
plot_point((X_LAYOUT_SHIFT + Y_PRINT_OFFSET) + 3, data[5] + X_PRINT_OFFSET);
437439
}
438440
else
439441
{
440-
plot_point(X_LAYOUT_SHIFT + Y_PRINT_OFFSET, data[2] + X_PRINT_OFFSET);
441-
plot_point(X_LAYOUT_SHIFT + Y_PRINT_OFFSET, data[3] + X_PRINT_OFFSET);
442+
plot_point(X_LAYOUT_SHIFT + Y_PRINT_OFFSET, data[2] + X_PRINT_OFFSET);
443+
plot_point(X_LAYOUT_SHIFT + Y_PRINT_OFFSET, data[3] + X_PRINT_OFFSET);
442444
}
443445

444446
mvprintw(LINES - 1, 0, "Press 'q' to quit.");

lib/diag.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ int switchtec_diag_eye_6p_data_fetch(struct switchtec_dev *dev, struct switchtec
262262
else if(out.status == EOM_SUCCESS)
263263
{
264264
printf("Eye Left %d\n", out.eye_left);
265-
printf("Eye Right %d\n", out.eye_right);
266-
printf("Eye top @X1 %d\n", out.eye_top_x1);
267-
printf("Eye Bottom @X1 %d\n", out.eye_bottom_x1);
265+
printf("Eye Right %d\n", out.eye_right);
266+
printf("Eye top @X1 %d\n", out.eye_top_x1);
267+
printf("Eye Bottom @X1 %d\n", out.eye_bottom_x1);
268268
printf("Eye top @X2 %d\n", out.eye_top_x2);
269269
printf("Eye Bottom @X2 %d\n", out.eye_bottom_x2);
270270

0 commit comments

Comments
 (0)