diff options
| author | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-09-09 11:37:36 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-09-09 11:37:36 +0300 |
| commit | d7080c93350b96e49d80450d5e1a76fd6f3ad64e (patch) | |
| tree | c9816297851bc5d0a04cfba4abb16fabef05bbce /Software/Visual_Studio/Tango.Emulations/Emulators | |
| parent | 1cbef6c4d79a1db8c8d3923edfec2e50277caa51 (diff) | |
| download | Tango-d7080c93350b96e49d80450d5e1a76fd6f3ad64e.tar.gz Tango-d7080c93350b96e49d80450d5e1a76fd6f3ad64e.zip | |
New Extra Inks and Default LiquidTypesRml * DefaultFactor Handling.
Diffstat (limited to 'Software/Visual_Studio/Tango.Emulations/Emulators')
| -rw-r--r-- | Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index de9168cac..123f72e67 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -91,6 +91,7 @@ namespace Tango.Emulations.Emulators private MachineType _machineType; private ProcessParameters _processParameters; private bool _failJob; + private HardwareConfiguration _hardwareConfiguration; #region Properties @@ -164,15 +165,6 @@ namespace Tango.Emulations.Emulators MachineStatus.SpoolState = SpoolState.Present; MachineStatus.State = MachineState.Ready; - for (int i = 0; i < 10; i++) - { - MachineStatus.IDSPacksLevels.Add(new IDSPackLevel() - { - Index = i, - DispenserLevel = 130000000, - MidTankLevel = 2.5, - }); - } for (int i = 0; i < 4; i++) { if (i == 2) @@ -784,7 +776,7 @@ namespace Tango.Emulations.Emulators res.Status = MachineStatus; res.Status.OverallTemperature = Cursor.Position.Y; - if (!EmulateCorruption) + if (!EmulateCorruption && _hardwareConfiguration != null) { Transporter.SendResponse<StartMachineStatusUpdateResponse>(res, request.Container.Token); } @@ -1427,6 +1419,20 @@ namespace Tango.Emulations.Emulators private void HandleUploadHardwareConfigurationRequest(TangoMessage<UploadHardwareConfigurationRequest> request) { + _hardwareConfiguration = request.Message.HardwareConfiguration; + + int dispenserCount = _hardwareConfiguration != null ? _hardwareConfiguration.Dispensers.Count : 10; + + for (int i = 0; i < dispenserCount; i++) + { + MachineStatus.IDSPacksLevels.Add(new IDSPackLevel() + { + Index = i, + DispenserLevel = 130000000, + MidTankLevel = 2.5, + }); + } + Transporter.SendResponse<UploadHardwareConfigurationResponse>(new UploadHardwareConfigurationResponse(), request.Container.Token); } |
