mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:38:52 +08:00
matrix: remove bold printing of diagonal elements
As this was not working in NSH. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Daniel Agar
parent
b2b7439060
commit
5dfdf8c071
@@ -391,12 +391,6 @@ public:
|
|||||||
for (unsigned j = 0; j < N; j++) {
|
for (unsigned j = 0; j < N; j++) {
|
||||||
double d = static_cast<double>(self(i, j));
|
double d = static_cast<double>(self(i, j));
|
||||||
|
|
||||||
// Matrix diagonal elements
|
|
||||||
if (N > 1 && M > 1 && i == j) {
|
|
||||||
// make diagonal elements bold (ANSI CSI n 1)
|
|
||||||
printf("\033[1m");
|
|
||||||
}
|
|
||||||
|
|
||||||
// if symmetric don't print upper triangular elements
|
// if symmetric don't print upper triangular elements
|
||||||
if ((M == N) && (j > i) && (i < N) && (j < M)
|
if ((M == N) && (j > i) && (i < N) && (j < M)
|
||||||
&& (fabs(d - static_cast<double>(self(j, i))) < (double)eps)
|
&& (fabs(d - static_cast<double>(self(j, i))) < (double)eps)
|
||||||
@@ -417,12 +411,6 @@ public:
|
|||||||
printf("% 6.5f ", d);
|
printf("% 6.5f ", d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Matrix diagonal elements
|
|
||||||
if (N > 1 && M > 1 && i == j) {
|
|
||||||
// reset any formatting (ANSI CSI n 0)
|
|
||||||
printf("\033[0m");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user