Beispiel #1
0
 private void StageDirectReset()
 {
     BatteryTest.Check(_master, true);
     TankTest.Check(_master, true);
     if (_currentStageTime > 450)
     {
         SafeguardTest.Check(_master, true);
         AlarmLightTest.Check(_master, false);
         _master.PaperLog.Append("-- Stage quickly acknowledge the alarm done \n");
         _currentStageTime = 0;
         Stage             = Stages.Wait;
     }
     else if (_currentStageTime > 300)
     {
         _master.Simulation.OnAcknowledgeButtonChange(false);
     }
     else if (_currentStageTime > 150)
     {
         _master.Simulation.OnAcknowledgeButtonChange(true);
     }
     else if (_currentStageTime > 50)
     {
         AlarmLightTest.Check(_master, true);
     }
 }
Beispiel #2
0
 private void StageBlackout()
 {
     if (_currentStageTime > 300)
     {
         SafeguardTest.Check(_master, true);
         AlarmLightTest.Check(_master, true);
         _master.PaperLog.Append("-- Stage controller reset done \n");
         _currentStageTime = 0;
         Stage             = Stages.DirectReset;
     }
     else if (_currentStageTime > 200)
     {
     }
     else if (_currentStageTime > 100)
     {
         if (!_resetControllerDone)
         {
             _master.SimulationMaster.Reset();
             _master.PaperLog.Append("Recorded controller blackout - restarting... \n");
             _resetControllerDone = true;
         }
     }
     else if (_currentStageTime > 50)
     {
         AlarmLightTest.Check(_master, true);
     }
 }
Beispiel #3
0
 private void StageLeakage()
 {
     BatteryTest.Check(_master);
     TankTest.Check(_master);
     if (_currentStageTime > 100)
     {
         AlarmLightTest.Check(_master, true);
         SafeguardTest.Check(_master, true);
         _currentStageTime = 0;
         _master.PaperLog.Append("-- Stage leakage done\n");
         Stage = Stages.WaitCharges;
     }
 }
Beispiel #4
0
 private void StageCoolDown()
 {
     AlarmLightTest.Check(_master, false);
     if (_currentStageTime > 1000)
     {
         _master.PaperLog.Append("\n*** Stopped protocol ***\n\n");
         _currentStageTime = 0;
         Stage             = Stages.Done;
     }
     if (_currentStageTime > 100)
     {
         BatteryTest.Check(_master, false);
         TankTest.Check(_master, false);
         SafeguardTest.Check(_master, false);
     }
 }
Beispiel #5
0
 private void StageReset()
 {
     if (_currentStageTime > 300)
     {
         AlarmLightTest.Check(_master, false);
         SafeguardTest.Check(_master, false);
         _currentStageTime = 0;
         _master.PaperLog.Append("-- Stage reset alarm done\n");
         _master.PaperLog.Append("***Reset Simulation***\n");
         _master.Simulation.ResetSimulation();
         Stage = Stages.Redo;
     }
     else if (_currentStageTime > 200)
     {
         _master.Simulation.OnAcknowledgeButtonChange(false);
     }
     else if (_currentStageTime > 100)
     {
         BatteryTest.Check(_master, false);
         TankTest.Check(_master, false);
         _master.Simulation.OnAcknowledgeButtonChange(true);
     }
 }
Beispiel #6
0
 private void StageWaitCharges()
 {
     BatteryTest.Check(_master);
     TankTest.Check(_master);
     SafeguardTest.Check(_master, true);
     AlarmLightTest.Check(_master, true);
     if ((_master.Simulation.PressureSignal >= 2000 && _master.Simulation.BatterySignal >= 45f) ||
         _currentStageTime > 10000)
     {
         if (_currentStageTime < 5000)
         {
             _master.PaperLog.Append("Time needed to charge: " + _currentStageTime + "\n");
             _master.PaperLog.Append("-- Stage wait for correct battery voltage and tank pressure done\n");
         }
         else
         {
             StageRechargeTimedOut = true;
             _master.PaperLog.AppendWarning("-- Stage wait for correct battery voltage and tank pressure timed out!\n");
         }
         _currentStageTime = 0;
         Stage             = Stages.Reset;
     }
 }