Skip to content

Commit 2f4058f

Browse files
committed
fix bug of adjust
1 parent eb53230 commit 2f4058f

File tree

6 files changed

+79
-4
lines changed

6 files changed

+79
-4
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ PREPEND_H(FULL_H src/Aris_Plan ${SOURCE})
109109
add_library(Aris_Plan STATIC ${FULL_SRC} ${FULL_H})
110110
set(INCLUDE_HEADER_FILES ${INCLUDE_HEADER_FILES} ${FULL_H})
111111

112+
# Aris_Plan project
113+
set(SOURCE Aris_Sensor)
114+
PREPEND_CPP(FULL_SRC src/Aris_Sensor ${SOURCE})
115+
PREPEND_H(FULL_H src/Aris_Sensor ${SOURCE})
116+
add_library(Aris_Sensor STATIC ${FULL_SRC} ${FULL_H})
117+
set(INCLUDE_HEADER_FILES ${INCLUDE_HEADER_FILES} ${FULL_H})
118+
112119
# Aris_Control project only in linux
113120
if(UNIX)
114121
set(SOURCE_FILES Aris_Control.cpp Aris_ControlData.cpp Aris_Sensor.cpp Aris_Device.cpp Aris_SysBase.cpp )
@@ -185,7 +192,7 @@ endif(WIN32)
185192

186193

187194

188-
install(TARGETS Aris_Core Aris_DynKer Aris_ExpCal Aris_Plan ARCHIVE DESTINATION lib)
195+
install(TARGETS Aris_Core Aris_DynKer Aris_ExpCal Aris_Plan Aris_Sensor ARCHIVE DESTINATION lib)
189196
install(FILES ${INCLUDE_HEADER_FILES} DESTINATION include)
190197
install(DIRECTORY src/Aris_Control/resource/ DESTINATION resource/Aris_Control)
191198

src/Aris_DynKer/Aris_DynKer.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,17 @@ namespace Aris
15821582
v_out[i] = v1_in[i] + v2_in[i];
15831583
}
15841584
}
1585+
double s_vn_dot_vn(int N, const double *v1_in, const double *v2_in) noexcept
1586+
{
1587+
double ret{0};
1588+
1589+
for (int i = 0; i < N; ++i)
1590+
{
1591+
ret += v1_in[i] * v2_in[i];
1592+
}
1593+
1594+
return ret;
1595+
}
15851596
void s_v_cro_pm(const double *v_in, const double *pm_in, double *vpm_out) noexcept
15861597
{
15871598
vpm_out[0] = -v_in[5] * pm_in[4] + v_in[4] * pm_in[8];

src/Aris_DynKer/Aris_DynKer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ namespace Aris
294294
void s_m6_dot_v6(const double *m6_in, const double *v6_in, double *v6_out) noexcept;
295295

296296
void s_vn_add_vn(int N, const double *v1_in, const double *v2_in, double *v_out) noexcept;
297+
double s_vn_dot_vn(int N, const double *v1_in, const double *v2_in) noexcept;
297298

298299
void s_v_cro_pm(const double *v_in, const double *pm_in, double *vpm_out) noexcept;
299300

src/Aris_DynKer/Aris_DynModel.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ namespace Aris
8989
virtual void Initiate();
9090

9191
private:
92-
/*for adams*/
93-
std::unique_ptr<AKIMA> posCurve;
94-
std::unique_ptr<AKIMA> fceCurve;
9592

9693
friend class MODEL_BASE;
9794
friend class MODEL;

src/Aris_Sensor/Aris_Sensor.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include"Aris_Sensor.h"
2+
3+
4+
namespace Aris
5+
{
6+
namespace Sensor
7+
{
8+
//SENSOR_BASE::SENSOR_BASE() {};
9+
//void SENSOR_BASE::Start()
10+
//{
11+
//
12+
13+
14+
15+
//}
16+
//void SENSOR_BASE::Stop()
17+
//{
18+
19+
//}
20+
//
21+
}
22+
}

src/Aris_Sensor/Aris_Sensor.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#ifndef ARIS_SENSOR_H_
2+
#define ARIS_SENSOR_H_
3+
4+
#include <memory>
5+
#include <thread>
6+
7+
using namespace std;
8+
9+
namespace Aris
10+
{
11+
namespace Sensor
12+
{
13+
/*class SENSOR_BASE
14+
{
15+
public:
16+
virtual int GetDataSize() const = 0;
17+
void Start();
18+
void Stop();
19+
20+
SENSOR_BASE();
21+
virtual ~SENSOR_BASE() = default;
22+
23+
private:
24+
virtual void UpdateData(char *dataAddress) = 0;
25+
26+
SENSOR_BASE(const SENSOR_BASE&) = delete;
27+
SENSOR_BASE & operator=(const SENSOR_BASE&) = delete;
28+
29+
private:
30+
std::unique_ptr<char> data1{ new char[GetDataSize()] }, data2{ new char[GetDataSize()] };
31+
std::thread sensor_thread;
32+
};*/
33+
}
34+
}
35+
36+
37+
#endif

0 commit comments

Comments
 (0)