Skip to content

Commit

Permalink
Merge pull request #10 from Kersoph/P2_UT_Fixes
Browse files Browse the repository at this point in the history
P2 UT Fixes
  • Loading branch information
Kersoph authored Aug 23, 2021
2 parents cd71b8c + c57a982 commit 74dd13c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions data/plant_models/mass_test_chamber/EmergencySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected override StateTable DefineInputs()
return new StateTable(
new List<StateEntry<bool>>()
{
{ new StateEntry<bool>(SafeguardResetKey, false, "Reset protection device", "True will tell the protection device to reset.") },
{ new StateEntry<bool>(SafeguardResetKey, false, "Reset emergency state", "True will tell the protection device to reset\nto return to regular operation.") },
{ new StateEntry<bool>(AlarmLightKey, false, "Alarm light", "True will activate the alarm light in the chamber.\nFalse will turn it off.") },
{ new StateEntry<bool>(ChargingKey, false, "Charge batteries", "True will charge the batteries with a constant current.\nFalse will stop charging them.") },
{ new StateEntry<bool>(FillingKey, false, "Build pressure", "True will turn on the air compressor.\nFalse will turn it off.") },
Expand All @@ -156,7 +156,7 @@ protected override StateTable DefineOutput()
return new StateTable(
new List<StateEntry<bool>>()
{
{ new StateEntry<bool>(SafeguardKey, false, "Protection device signal", "True after a system error has been detected\nand not yet reset.") },
{ new StateEntry<bool>(SafeguardKey, false, "Emergency state active", "True after a critical system error has been detected\nand not yet reset.") },
{ new StateEntry<bool>(AcknowledgeButtonKey, false, "Acknowledge alarm button", "True if someone acknowledges the alarm.\nFalse otherwise.") },
},
new List<StateEntry<int>>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public void Check(EmergencySystemTest master, bool expected)
{
if (master.Simulation.SafeguardSignal && !expected)
{
master.PaperLog.AppendWarning("The safeguard should be reset.\n");
master.PaperLog.AppendWarning("The emergency state should be reset.\n");
WrongTime = true;
}
else if (!master.Simulation.SafeguardSignal && expected)
{
master.PaperLog.AppendError("The safeguard reset at the wrong time!\n");
master.PaperLog.AppendError("The emergency state was reset at the wrong time!\n");
WrongTime = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lessons/4/Description.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Title": "[center]Reactor\nEmergency\nSystem[/center]",
"Description": "[fill]You are hired to build the emergency visualisation and reset behaviour system for an experimental reactor.\n\nThe task is described by Dr. Rosenberg as follows:\n'In case something goes wrong with the experiment and charged particles escape in the chamber, we want a controlled reset.\nIf the [b]protection device[/b] triggers, the [b]emergency warning light[/b] must be turned on, the [b]tank pressure[/b] refilled quickly to 2000hpa, and the [b]battery voltage[/b] recharged to 45V.\nOperators can acknowledge the error which will turn off the emergency warning light. If every system is back to normal, we can signal the [b]protection device to reset[/b] and return to the normal operation mode.'[fill]",
"Description": "[fill]You are hired to build the emergency visualisation and reset behaviour system for an experimental reactor.\n\nThe task is described by Dr. Rosenberg as follows:\n'In case something goes wrong with the experiment and charged particles escape in the chamber, we want a controlled reset.\nIf the [b]emergency state[/b] triggers, the [b]emergency warning light[/b] must be turned on, the [b]tank pressure[/b] refilled quickly to 2000hpa, and the [b]battery voltage[/b] recharged to 45V.\nOperators can acknowledge the error which will turn off the emergency warning light. If every system is back to normal, we can signal to [b]reset the emergency state[/b] and return to the normal operation mode.'[fill]",
"Goal": "[fill]Build the emergency visualisation and reset behaviour of the reactor.[fill]",
"Simulation": "res://data/plant_models/mass_test_chamber/EmergencySystem.tscn",
"Test": "res://data/plant_models/mass_test_chamber/EmergencySystemTest.tscn"
Expand Down

0 comments on commit 74dd13c

Please sign in to comment.