mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-12 01:27:35 +08:00
update to astyle 2.06 and fix formatting
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ endif()
|
||||
if(FORMAT)
|
||||
set(astyle_exe ${CMAKE_BINARY_DIR}/astyle/src/bin/astyle)
|
||||
add_custom_command(OUTPUT ${astyle_exe}
|
||||
COMMAND wget http://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz -O /tmp/astyle.tar.gz
|
||||
COMMAND wget http://sourceforge.net/projects/astyle/files/astyle/astyle%202.06/astyle_2.06_linux.tar.gz -O /tmp/astyle.tar.gz
|
||||
COMMAND tar -xvf /tmp/astyle.tar.gz
|
||||
COMMAND cd astyle/src && make -f ../build/gcc/Makefile
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
|
||||
+8
-8
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = self(i, j)*other(i, j);
|
||||
res(i, j) = self(i, j)*other(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = self(i, j)/other(i, j);
|
||||
res(i, j) = self(i, j)/other(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = self(i, j) + other(i, j);
|
||||
res(i, j) = self(i, j) + other(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = self(i, j) - other(i, j);
|
||||
res(i, j) = self(i, j) - other(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = -self(i, j);
|
||||
res(i, j) = -self(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = self(i, j) * scalar;
|
||||
res(i, j) = self(i, j) * scalar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
res(i , j) = self(i, j) + scalar;
|
||||
res(i, j) = self(i, j) + scalar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ bool isEqual(const Matrix<Type, M, N> &x,
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
for (size_t j = 0; j < N; j++) {
|
||||
if (fabs(x(i , j) - y(i, j)) > eps) {
|
||||
if (fabs(x(i, j) - y(i, j)) > eps) {
|
||||
equal = false;
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-3
@@ -55,8 +55,8 @@ int main()
|
||||
};
|
||||
|
||||
float data2_check[81] = {
|
||||
6, -4, 3, -3 , -9, -8, -10, 8, 14,
|
||||
-2, -7, -5, -3 , -2, -2, -16, -5, 8,
|
||||
6, -4, 3, -3, -9, -8, -10, 8, 14,
|
||||
-2, -7, -5, -3, -2, -2, -16, -5, 8,
|
||||
-2, 0, -23, 7, -24, -5, -28, -14, 9,
|
||||
3, -7, 2, -5, -4, -6, -13, 4, 13,
|
||||
-1, 4, -8, 5, -8, 0, -3, -5, -2,
|
||||
@@ -115,7 +115,7 @@ int main()
|
||||
|
||||
float data4_cholesky[9] = {
|
||||
1.15529921f, 0.f, 0.f,
|
||||
0.6487213f , 0.80892311f, 0.f,
|
||||
0.6487213f, 0.80892311f, 0.f,
|
||||
-0.04602089f, 0.13625271f, 0.99774847f
|
||||
};
|
||||
SquareMatrix<float, 3> A4_cholesky_check(data4_cholesky);
|
||||
|
||||
Reference in New Issue
Block a user