|
@@ -69,7 +69,7 @@ std::thread * g_prsm1ProcThread;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- float pixlToDistance(int distance, int dsr){
|
|
|
+ inline float pixlToDistance(int distance, int dsr){
|
|
|
float result;
|
|
|
int cor = channel_cor[dsr];
|
|
|
if(distance <= cor)
|
|
@@ -81,21 +81,21 @@ std::thread * g_prsm1ProcThread;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- float yawToDeg(int deg){
|
|
|
+inline float yawToDeg(int deg){
|
|
|
float result_f;
|
|
|
float deg_f =deg;
|
|
|
result_f = (deg_f * (1350.0f / 65534.0f) - 675.0f);
|
|
|
return result_f;
|
|
|
}
|
|
|
|
|
|
- float pitchToDeg(int deg){
|
|
|
+ inline float pitchToDeg(int deg){
|
|
|
float result_f;
|
|
|
float deg_f = deg;
|
|
|
result_f = (deg_f * (1250.0f / pitch_max ) - 625.0f);
|
|
|
return result_f;
|
|
|
}
|
|
|
|
|
|
- void processrs_M1_Data(QByteArray ba)
|
|
|
+ inline void processrs_M1_Data(QByteArray ba)
|
|
|
{
|
|
|
unsigned char * pdata;
|
|
|
float fa,fb;
|
|
@@ -141,7 +141,8 @@ void getPacket(int n){
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
|
+ std::this_thread::sleep_for(std::chrono::microseconds(50));
|
|
|
+ // std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
|
}
|
|
|
}
|
|
|
udpSocket->close();
|