This commit is contained in:
parent
7d1ad772c9
commit
59e2373ce7
|
|
@ -49,7 +49,7 @@ namespace Script
|
|||
vehicleController = GetComponent<VehicleController>();
|
||||
vehicleStandardInput = GetComponent<VehicleStandardInput>();
|
||||
|
||||
StartModbus();
|
||||
// StartModbus();
|
||||
ModBusQueue();
|
||||
}
|
||||
|
||||
|
|
@ -66,10 +66,10 @@ namespace Script
|
|||
}
|
||||
|
||||
|
||||
public void HHHHHH()
|
||||
{
|
||||
client.SendModbusRequest12();
|
||||
}
|
||||
// public void HHHHHH()
|
||||
// {
|
||||
// client.SendModbusRequest12();
|
||||
// }
|
||||
// void OnDestroy()
|
||||
// {
|
||||
// client.CloseConnection();
|
||||
|
|
@ -80,11 +80,17 @@ namespace Script
|
|||
while (true)
|
||||
{
|
||||
// Debug.Log(client.modbusQueue.Count);
|
||||
if (client.modbusQueue.Count > 0)
|
||||
{
|
||||
Debug.Log(client.modbusQueue.Count);
|
||||
// if (client.modbusQueue.Count > 0)
|
||||
// {
|
||||
// Debug.Log(client.modbusQueue.Count);
|
||||
//
|
||||
// carData = client.modbusQueue.Dequeue();
|
||||
|
||||
carData = client.modbusQueue.Dequeue();
|
||||
if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0)
|
||||
{
|
||||
// Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count);
|
||||
|
||||
carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue();
|
||||
|
||||
|
||||
//方向盘
|
||||
|
|
|
|||
Loading…
Reference in New Issue