Background
Currently, CoralSubsystem directly depends on ElevatorSubsystem through constructor injection:
class CoralSubsystem(private val io: CoralIO, private val elevator: ElevatorSubsystem)
Problem
This creates tight coupling between these subsystems which may not be ideal for the following reasons:
- Makes testing CoralSubsystem in isolation more difficult
- Creates a direct dependency between subsystems that should potentially be independent
- May cause circular dependencies if ElevatorSubsystem ever needs to interact with CoralSubsystem
Potential Solutions
Consider alternatives such as:
- Using an event/message bus for communication between subsystems
- Creating an interface that ElevatorSubsystem implements
- Using a mediator pattern to handle inter-subsystem communication
References
@Baconing requested this issue to track the concern for future refactoring.
Background
Currently, CoralSubsystem directly depends on ElevatorSubsystem through constructor injection:
Problem
This creates tight coupling between these subsystems which may not be ideal for the following reasons:
Potential Solutions
Consider alternatives such as:
References
@Baconing requested this issue to track the concern for future refactoring.