diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Emulations')
| -rw-r--r-- | Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs | 18 |
1 files changed, 18 insertions, 0 deletions
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<MotorHomingResponse>(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; + } + } }); } |
