This commit is contained in:
yzx 2023-12-28 10:09:07 +08:00
parent ae5e87a66e
commit 46fb6e8281
2 changed files with 46025 additions and 44278 deletions

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@ namespace Script
vehicleController = GetComponent<VehicleController>();
vehicleStandardInput = GetComponent<VehicleStandardInput>();
// StartModbus();
StartModbus();
ModBusQueue();
}
@ -92,17 +92,17 @@ namespace Script
while (true)
{
// Debug.Log(client.modbusQueue.Count);
// if (client.modbusQueue.Count > 0)
// {
// // Debug.Log(client.modbusQueue.Count);
//
// carData = client.modbusQueue.Dequeue();
if (client.modbusQueue.Count > 0)
{
// Debug.Log(client.modbusQueue.Count);
carData = client.modbusQueue.Dequeue();
if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0)
{
// Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count);
carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue();
// if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0)
// {
// // Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count);
//
// carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue();
//方向盘