mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 05:04:48 +00:00
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
|||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
$version = ./.github/scripts/GenerateVersionNumber.ps1
|
$version = ./.github/scripts/GenerateVersionNumber.ps1
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
# Use the version number to set the version of the assemblies
|
# Use the version number to set the version of the assemblies
|
||||||
- name: Update AssemblyInfo.cs
|
- name: Update AssemblyInfo.cs
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
@@ -178,7 +178,7 @@ jobs:
|
|||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
# Checkout/Create the branch
|
# Checkout/Create the branch
|
||||||
@@ -255,7 +255,7 @@ jobs:
|
|||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
# Checkout/Create the branch
|
# Checkout/Create the branch
|
||||||
|
|||||||
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
|||||||
shell: powershell
|
shell: powershell
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ github.event.release.tag_name }}
|
TAG_NAME: ${{ github.event.release.tag_name }}
|
||||||
run: Write-Output "::set-env name=VERSION::$($Env:TAG_NAME)"
|
run: echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
# Use the version number to set the version of the assemblies
|
# Use the version number to set the version of the assemblies
|
||||||
- name: Update AssemblyInfo.cs
|
- name: Update AssemblyInfo.cs
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
@@ -152,7 +152,7 @@ jobs:
|
|||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
# Checkout/Create the branch
|
# Checkout/Create the branch
|
||||||
@@ -225,7 +225,7 @@ jobs:
|
|||||||
Get-ChildItem "./Version"
|
Get-ChildItem "./Version"
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
$version = Get-Content -Path ./Version/version.txt
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./Version/version.txt
|
||||||
Remove-Item -Path ./Version
|
Remove-Item -Path ./Version
|
||||||
# Checkout/Create the branch
|
# Checkout/Create the branch
|
||||||
|
|||||||
@@ -79,10 +79,7 @@ namespace PepperDash.Core
|
|||||||
|
|
||||||
_DebugTimeoutInMs = minutes * 60000;
|
_DebugTimeoutInMs = minutes * 60000;
|
||||||
|
|
||||||
if (DebugExpiryPeriod != null)
|
StopDebugTimer();
|
||||||
{
|
|
||||||
DisableDebugging();
|
|
||||||
}
|
|
||||||
|
|
||||||
DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs);
|
DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs);
|
||||||
|
|
||||||
@@ -101,14 +98,24 @@ namespace PepperDash.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void DisableDebugging()
|
private void DisableDebugging()
|
||||||
{
|
{
|
||||||
DebugExpiryPeriod.Stop();
|
StopDebugTimer();
|
||||||
DebugExpiryPeriod.Dispose();
|
|
||||||
DebugExpiryPeriod = null;
|
|
||||||
|
|
||||||
|
Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StopDebugTimer()
|
||||||
|
{
|
||||||
RxStreamDebuggingIsEnabled = false;
|
RxStreamDebuggingIsEnabled = false;
|
||||||
TxStreamDebuggingIsEnabled = false;
|
TxStreamDebuggingIsEnabled = false;
|
||||||
|
|
||||||
Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off);
|
if (DebugExpiryPeriod == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugExpiryPeriod.Stop();
|
||||||
|
DebugExpiryPeriod.Dispose();
|
||||||
|
DebugExpiryPeriod = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ namespace PepperDash.Core
|
|||||||
void ConnectToServerCallback(TCPClient c)
|
void ConnectToServerCallback(TCPClient c)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Server connection result: {0}", c.ClientStatus);
|
Debug.Console(1, this, "Server connection result: {0}", c.ClientStatus);
|
||||||
if (c.ClientStatus != SocketStatus.SOCKET_STATUS_CONNECTED)
|
if (c.ClientStatus != SocketStatus.SOCKET_STATUS_CONNECTED && AutoReconnect)
|
||||||
WaitAndTryReconnect();
|
WaitAndTryReconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ namespace PepperDash.Core
|
|||||||
|
|
||||||
if (Client != null)
|
if (Client != null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Attempting reconnect, status={0}", Client.ClientStatus);
|
Debug.Console(1, this, "Attempting reconnect, status={0}", Client.ClientStatus);
|
||||||
|
|
||||||
if (!DisconnectCalledByUser)
|
if (!DisconnectCalledByUser)
|
||||||
RetryTimer = new CTimer(o => { Client.ConnectToServerAsync(ConnectToServerCallback); }, AutoReconnectIntervalMs);
|
RetryTimer = new CTimer(o => { Client.ConnectToServerAsync(ConnectToServerCallback); }, AutoReconnectIntervalMs);
|
||||||
|
|||||||
@@ -68,11 +68,9 @@ namespace PepperDash.Core.DebugThings
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void SetDebugSettingsForKey(string deviceKey, object settings)
|
public void SetDebugSettingsForKey(string deviceKey, object settings)
|
||||||
{
|
{
|
||||||
var existingSettings = DeviceDebugSettings[deviceKey];
|
if(DeviceDebugSettings.ContainsKey(deviceKey))
|
||||||
|
|
||||||
if (existingSettings != null)
|
|
||||||
{
|
{
|
||||||
existingSettings = settings;
|
DeviceDebugSettings[deviceKey] = settings;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DeviceDebugSettings.Add(deviceKey, settings);
|
DeviceDebugSettings.Add(deviceKey, settings);
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ namespace PepperDash.Core.Intersystem.Tokens
|
|||||||
|
|
||||||
public override byte[] GetBytes()
|
public override byte[] GetBytes()
|
||||||
{
|
{
|
||||||
var serialBytes = Encoding.GetEncoding(28591).GetBytes(Value);
|
var serialBytes = String.IsNullOrEmpty(Value) ? new byte[0] : Encoding.GetEncoding(28591).GetBytes(Value);
|
||||||
|
|
||||||
var xsig = new byte[serialBytes.Length + 3];
|
var xsig = new byte[serialBytes.Length + 3];
|
||||||
xsig[0] = (byte)(0xC8 | (Index >> 7));
|
xsig[0] = (byte)(0xC8 | (Index >> 7));
|
||||||
xsig[1] = (byte)((Index - 1) & 0x7F);
|
xsig[1] = (byte)((Index - 1) & 0x7F);
|
||||||
|
|||||||
Reference in New Issue
Block a user