From a63b5db93859fac695d1b9faea23b79e3a070179 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 11 Dec 2020 04:45:05 +0200 Subject: Fixed issues with reset counters. Display general authorization error instead of unexpected application error. Display environment on FSE. Completed cleaner dispensing dialog. Hide/show "Open/Close dyeing head lid" on Flat/Arc. Emulator will raise proper "Opened" events after "Open dyeing head lid" command. Updated EF Extensions version to all project due to a bug in "DeleteFromQuery". --- .../Tango.Emulations/Emulators/MachineEmulator.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Software/Visual_Studio/Tango.Emulations') diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 9cdf6dcae..6360b7bbc 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -1009,6 +1009,24 @@ namespace Tango.Emulations.Emulators Transporter.SendResponse(new MotorHomingResponse() { MaxProgress = 100, Progress = 100 }, request.Container.Token, new TransportResponseConfig() { Completed = true }); _motorHomingRequestCodes.Remove(homeRequest.MotorType); ResetGraphFactors(); + + if (request.Message.MotorType == PMR.Hardware.HardwareMotorType.MotoDhLid) + { + if (request.Message.Direction == MotorDirection.Backward) + { + var eventState1 = EventsStates.FirstOrDefault(x => x.EventType == PMR.Diagnostics.EventType.DyeingHeadArcLidIsOpen); + var eventState2 = EventsStates.FirstOrDefault(x => x.EventType == PMR.Diagnostics.EventType.DyeingHeadCoverIsOpen); + eventState1.IsActive = true; + eventState2.IsActive = true; + } + else + { + var eventState1 = EventsStates.FirstOrDefault(x => x.EventType == PMR.Diagnostics.EventType.DyeingHeadArcLidIsOpen); + var eventState2 = EventsStates.FirstOrDefault(x => x.EventType == PMR.Diagnostics.EventType.DyeingHeadCoverIsOpen); + eventState1.IsActive = false; + eventState2.IsActive = false; + } + } }); } -- cgit v1.3.1