Merge branch 'development-2.0.0' into feature-2.0.0/emergencyOSD

This commit is contained in:
Nick Genovese
2025-01-10 07:31:35 -05:00
4 changed files with 70 additions and 62 deletions

View File

@@ -58,6 +58,7 @@ jobs:
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER $newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
} }
} }
echo "version=$newVersionString" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append echo "version=$newVersionString" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Setup MS Build - name: Setup MS Build
uses: microsoft/setup-msbuild@v1.1 uses: microsoft/setup-msbuild@v1.1
@@ -69,16 +70,13 @@ jobs:
- name: Pack Solution - name: Pack Solution
run: dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}" run: dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}"
- name: Create tag for non-rc builds - name: Create tag for non-rc builds
if: contains(steps.setVersion.outputs.version, 'alpha') if: ${{ !contains(steps.setVersion.outputs.version, 'rc') }}
run: | run: |
git tag ${{ steps.setVersion.outputs.version }} git tag ${{ steps.setVersion.outputs.version }}
git push --tags origin git push --tags origin
# Create the release on the source repo # Create the release on the source repo
- name: Create Release - name: Create Release
id: create_release id: create_release
# if: contains(steps.setVersion.outputs.version,'-rc-') ||
# contains(steps.setVersion.outputs.version,'-hotfix-') ||
# contains(steps.setVersion.outputs.version, '-beta-')
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with:
artifacts: 'output\**\*.*(cpz|cplz)' artifacts: 'output\**\*.*(cpz|cplz)'

View File

@@ -61,9 +61,10 @@ namespace PepperDash.Essentials.Core
SignalType = signalType SignalType = signalType
}; };
var coolingDevice = destination as IWarmingCooling;
var coolingDevice = destination as IWarmingCooling;
//We already have a route request for this device, and it's a cooling device and is cooling //We already have a route request for this device, and it's a cooling device and is cooling
if (RouteRequests.TryGetValue(destination.Key, out RouteRequest existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true) if (RouteRequests.TryGetValue(destination.Key, out RouteRequest existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
{ {
@@ -81,8 +82,6 @@ namespace PepperDash.Essentials.Core
//New Request //New Request
if (coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true) if (coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true)
{ {
coolingDevice.IsCoolingDownFeedback.OutputChange -= routeRequest.HandleCooldown;
coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown; coolingDevice.IsCoolingDownFeedback.OutputChange += routeRequest.HandleCooldown;
RouteRequests.Add(destination.Key, routeRequest); RouteRequests.Add(destination.Key, routeRequest);
@@ -93,7 +92,12 @@ namespace PepperDash.Essentials.Core
if (RouteRequests.ContainsKey(destination.Key) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == false) if (RouteRequests.ContainsKey(destination.Key) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == false)
{ {
var handledRequest = RouteRequests[destination.Key];
coolingDevice.IsCoolingDownFeedback.OutputChange -= handledRequest.HandleCooldown;
RouteRequests.Remove(destination.Key); RouteRequests.Remove(destination.Key);
Debug.LogMessage(LogEventLevel.Information, "Device: {destination} is NOT cooling down. Removing stored route request and routing to source key: {sourceKey}", null, destination.Key, routeRequest.Source.Key); Debug.LogMessage(LogEventLevel.Information, "Device: {destination} is NOT cooling down. Removing stored route request and routing to source key: {sourceKey}", null, destination.Key, routeRequest.Source.Key);
} }

View File

@@ -77,8 +77,6 @@ namespace PepperDash.Essentials.Core
continue; continue;
} }
switchingDevice.ExecuteSwitch(null, route.OutputPort.Selector, SignalType);
if (route.OutputPort.InUseTracker != null) if (route.OutputPort.InUseTracker != null)
{ {
route.OutputPort.InUseTracker.RemoveUser(Destination, "destination-" + SignalType); route.OutputPort.InUseTracker.RemoveUser(Destination, "destination-" + SignalType);

View File

@@ -1,5 +1,6 @@
using PepperDash.Core; using PepperDash.Core;
using Serilog.Events; using Serilog.Events;
using System;
namespace PepperDash.Essentials.Core namespace PepperDash.Essentials.Core
{ {
@@ -14,14 +15,17 @@ namespace PepperDash.Essentials.Core
public void HandleCooldown(object sender, FeedbackEventArgs args) public void HandleCooldown(object sender, FeedbackEventArgs args)
{ {
Debug.LogMessage(LogEventLevel.Information, "Handling cooldown route request: {destination}:{destinationPort} -> {source}:{sourcePort} {type}", null, Destination.Key, DestinationPort.Key, Source.Key, SourcePort.Key, SignalType.ToString()); try
{
Debug.LogMessage(LogEventLevel.Information, "Handling cooldown route request: {destination}:{destinationPort} -> {source}:{sourcePort} {type}", null, Destination?.Key ?? "empty destination", DestinationPort?.Key ?? "no destination port", Source?.Key ?? "empty source", SourcePort?.Key ?? "empty source port", SignalType.ToString());
if (args.BoolValue == true) if (args.BoolValue == true)
{ {
return; return;
} }
Debug.LogMessage(LogEventLevel.Information, "Cooldown complete. Making route from {destination} to {source}", Destination.Key, Source.Key); Debug.LogMessage(LogEventLevel.Information, "Cooldown complete. Making route from {destination} to {source}", Destination?.Key, Source?.Key);
Destination.ReleaseAndMakeRoute(Source, SignalType, DestinationPort?.Key ?? string.Empty, SourcePort?.Key ?? string.Empty); Destination.ReleaseAndMakeRoute(Source, SignalType, DestinationPort?.Key ?? string.Empty, SourcePort?.Key ?? string.Empty);
if (sender is IWarmingCooling coolingDevice) if (sender is IWarmingCooling coolingDevice)
@@ -29,6 +33,10 @@ namespace PepperDash.Essentials.Core
Debug.LogMessage(LogEventLevel.Debug, "Unsubscribing from cooling feedback for {destination}", null, Destination.Key); Debug.LogMessage(LogEventLevel.Debug, "Unsubscribing from cooling feedback for {destination}", null, Destination.Key);
coolingDevice.IsCoolingDownFeedback.OutputChange -= HandleCooldown; coolingDevice.IsCoolingDownFeedback.OutputChange -= HandleCooldown;
} }
} catch(Exception ex)
{
Debug.LogMessage(ex, "Exception handling cooldown", Destination);
}
} }
} }
} }