Skip to content

Commit

Permalink
Add PowerNotch output in MetroAts core plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
winup-zhou committed Jan 31, 2025
1 parent a6a488c commit 9fb0981
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions MetroAts/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static class Config {
public static bool SignalSW_loop = false;

public static int Panel_brakeoutput = 1023;
public static int Panel_poweroutput = 1023;
public static int Panel_keyoutput = 1023;
public static int Panel_SignalSWoutput = 1023;

Expand All @@ -48,6 +49,7 @@ public static void Load() {
ReadConfig("signalsw", "isloop", ref SignalSW_loop);

ReadConfig("output", "signalsw", ref Panel_SignalSWoutput);
ReadConfig("output", "power", ref Panel_poweroutput);
ReadConfig("output", "brake", ref Panel_brakeoutput);
ReadConfig("output", "key", ref Panel_keyoutput);
} catch (Exception ex) {
Expand Down
3 changes: 2 additions & 1 deletion MetroAts/Tick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public override void Tick(TimeSpan elapsed) {
}
if(isDoorOpen) AtsHandles.ReverserPosition = ReverserPosition.N;
SubPluginEnabled = false;


panel[Config.Panel_poweroutput] = AtsHandles.PowerNotch;
panel[Config.Panel_brakeoutput] = AtsHandles.BrakeNotch;
panel[Config.Panel_keyoutput] = (int)Config.KeyPosLists[NowKey];
panel[Config.Panel_SignalSWoutput] = (int)Config.SignalSWLists[NowSignalSW];
Expand Down

0 comments on commit 9fb0981

Please sign in to comment.