Browse Source

1.完善代码

andrew.ge 1 year ago
parent
commit
74416d19d6

+ 5 - 5
SourceCode/RUSTasks/TaskAdmittanceControl/AdmittanceControl/AdmittanceControl.cpp

@@ -81,7 +81,7 @@ void AdmittanceControl::UpdateCurrentWayPoint(WayPoint wayPoint)
     }
     catch (...)
     {
-        LogError("Failed in UpdateCurrentWayPoint!\n")
+        LogError("Failed in UpdateCurrentWayPoint!\n");
     }
 }
 
@@ -103,7 +103,7 @@ void AdmittanceControl::UpdateCurrentForce(FTData force)
     }
     catch (...)
     {
-        LogError("Failed in UpdateCurrentForce!\n")
+        LogError("Failed in UpdateCurrentForce!\n");
     }
 }
 
@@ -122,7 +122,7 @@ void AdmittanceControl::UpdateReferWayPoint(WayPoint wayPoint)
     }
     catch (...)
     {
-        LogError("Failed in UpdateReferWayPoint!\n")
+        LogError("Failed in UpdateReferWayPoint!\n");
     }
 }
 
@@ -182,7 +182,7 @@ void AdmittanceControl::GetTargetWayPoint(WayPoint& wayPoint)
     }
     catch (...)
     {
-        LogError("Failed in GetTargetWayPoint!\n")
+        LogError("Failed in GetTargetWayPoint!\n");
     }
 }
 
@@ -195,7 +195,7 @@ void AdmittanceControl::StopAdmittanceControl()
     }
     catch (const std::exception&)
     {
-        LogError("Failed in StopAdmittanceControl!\n")
+        LogError("Failed in StopAdmittanceControl!\n");
     }
 
 

+ 2 - 1
SourceCode/RUSTasks/TaskFTSensorModule/FTSensorDataCaptureUitls/FTSensorDataCapture.cpp

@@ -42,6 +42,7 @@ void FTSensorDataCapture::ConnectSensor(const char* ipaddr, int port)
 void FTSensorDataCapture::DisConnectSensor()
 {
     _pFTSensor->DisConnectSensor();
+    _pFTSensor = NULL;
 }
 
 void FTSensorDataCapture::OpenSensor()
@@ -60,7 +61,7 @@ void FTSensorDataCapture::GetFTSensorRaw(FTData& sensorRaw)
         std::to_string(sensorRaw.CartFT.GenForce[2]) + " " +
         std::to_string(sensorRaw.CartFT.GenForce[3]) + " " +
         std::to_string(sensorRaw.CartFT.GenForce[4]) + " " +
-        std::to_string(sensorRaw.CartFT.GenForce[5]) + "\n").c_str())
+        std::to_string(sensorRaw.CartFT.GenForce[5]) + "\n").c_str());
 }
 
 

+ 1 - 2
SourceCode/RUSTasks/TaskFTSensorModule/FTSensorModuleLib/Provider/FTSensorDataProvider.cs

@@ -66,7 +66,6 @@ namespace FTSensorModuleLib
         public void StopGetFTSensorRaw()
         {
             _enableGetFTSensorRaw = false;
-            Dispose();
         }
 
         /// <summary>
@@ -89,7 +88,7 @@ namespace FTSensorModuleLib
             _disposing = true;
 
             DoDispose();
-            //断开连接
+            // 断开连接
             DisConnectSensor(_ftSensorHandle);
             _ftSensorHandle = IntPtr.Zero;
         }