From d81d4d888488a6a091275422c3092705a6d73ecc Mon Sep 17 00:00:00 2001 From: Andrew Vardeman Date: Thu, 7 Aug 2025 14:23:33 -0500 Subject: [PATCH] Two fixes for reading CNH Pro1200 Harvest data: - Stop forcing CategoryEnum.Variety to OperationTypeEnum.SowingAndPlanting (could be Harvesting) - In GetOperationTypeFromLoggingDevices, prefer a non-Unknown operation type --- ISOv4Plugin/Mappers/TimeLogMapper.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ISOv4Plugin/Mappers/TimeLogMapper.cs b/ISOv4Plugin/Mappers/TimeLogMapper.cs index 5c7e1e9..4922ace 100644 --- a/ISOv4Plugin/Mappers/TimeLogMapper.cs +++ b/ISOv4Plugin/Mappers/TimeLogMapper.cs @@ -684,9 +684,6 @@ private void AddProductAllocationsForDeviceElement(Dictionary t.ClientNAMEMachineType >= 2 && t.ClientNAMEMachineType <= 11); + DeviceOperationType deviceType = representedTypes.FirstOrDefault(t => t.ClientNAMEMachineType >= 2 && t.ClientNAMEMachineType <= 11 && + t.OperationType != OperationTypeEnum.Unknown); + if (deviceType != null) { //2-11 represent known types of operations