Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions track_signal_generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@
DISTANCE_TO_SWITCH = 10


def workaround(self) -> bool:
"""
Returns true if this node is a switch.
A switch is defined as a `Node` with a 2 connected tracks
"""
return len(self.connected_nodes) >= 3


Node.is_switch = workaround


class TrackSignalGenerator:
"""
Generates track-signals ("Blocksignale") for the given topology by walking
Expand Down