mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
fix: change ports and what's used where
This commit is contained in:
parent
25ebcdfb5d
commit
ed0141a536
1 changed files with 6 additions and 6 deletions
|
|
@ -178,8 +178,8 @@ namespace PepperDash.Essentials.Core
|
||||||
/// <param name="routeTable">The RouteDescriptor being populated as the route is discovered</param>
|
/// <param name="routeTable">The RouteDescriptor being populated as the route is discovered</param>
|
||||||
/// <returns>true if source is hit</returns>
|
/// <returns>true if source is hit</returns>
|
||||||
private static bool GetRouteToSource(this IRoutingInputs destination, IRoutingOutputs source,
|
private static bool GetRouteToSource(this IRoutingInputs destination, IRoutingOutputs source,
|
||||||
RoutingOutputPort sourcePort, List<IRoutingInputsOutputs> alreadyCheckedDevices,
|
RoutingOutputPort outputPortToUse, List<IRoutingInputsOutputs> alreadyCheckedDevices,
|
||||||
eRoutingSignalType signalType, int cycle, RouteDescriptor routeTable, RoutingInputPort destinationPort)
|
eRoutingSignalType signalType, int cycle, RouteDescriptor routeTable, RoutingInputPort destinationPort, RoutingOutputPort sourcePort)
|
||||||
{
|
{
|
||||||
cycle++;
|
cycle++;
|
||||||
|
|
||||||
|
|
@ -250,14 +250,14 @@ namespace PepperDash.Essentials.Core
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var midpointOutputPort = sourcePort ?? tieLine.SourcePort;
|
var midpointOutputPort = tieLine.SourcePort;
|
||||||
|
|
||||||
Debug.LogMessage(LogEventLevel.Verbose, "Trying to find route on {0}", destination, midpointDevice.Key);
|
Debug.LogMessage(LogEventLevel.Verbose, "Trying to find route on {0}", destination, midpointDevice.Key);
|
||||||
|
|
||||||
// haven't seen this device yet. Do it. Pass the output port to the next
|
// haven't seen this device yet. Do it. Pass the output port to the next
|
||||||
// level to enable switching on success
|
// level to enable switching on success
|
||||||
var upstreamRoutingSuccess = midpointDevice.GetRouteToSource(source, midpointOutputPort,
|
var upstreamRoutingSuccess = midpointDevice.GetRouteToSource(source, midpointOutputPort,
|
||||||
alreadyCheckedDevices, signalType, cycle, routeTable, null);
|
alreadyCheckedDevices, signalType, cycle, routeTable, null, sourcePort);
|
||||||
|
|
||||||
if (upstreamRoutingSuccess)
|
if (upstreamRoutingSuccess)
|
||||||
{
|
{
|
||||||
|
|
@ -277,14 +277,14 @@ namespace PepperDash.Essentials.Core
|
||||||
|
|
||||||
// we have a route on corresponding inputPort. *** Do the route ***
|
// we have a route on corresponding inputPort. *** Do the route ***
|
||||||
|
|
||||||
if (sourcePort == null)
|
if (destination is IRoutingSink)
|
||||||
{
|
{
|
||||||
// it's a sink device
|
// it's a sink device
|
||||||
routeTable.Routes.Add(new RouteSwitchDescriptor(goodInputPort));
|
routeTable.Routes.Add(new RouteSwitchDescriptor(goodInputPort));
|
||||||
}
|
}
|
||||||
else if (destination is IRouting)
|
else if (destination is IRouting)
|
||||||
{
|
{
|
||||||
routeTable.Routes.Add(new RouteSwitchDescriptor(sourcePort, goodInputPort));
|
routeTable.Routes.Add(new RouteSwitchDescriptor(outputPortToUse, goodInputPort));
|
||||||
}
|
}
|
||||||
else // device is merely IRoutingInputOutputs
|
else // device is merely IRoutingInputOutputs
|
||||||
Debug.LogMessage(LogEventLevel.Verbose, "No routing. Passthrough device", destination);
|
Debug.LogMessage(LogEventLevel.Verbose, "No routing. Passthrough device", destination);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue