4 Commits
1.1.4 ... 1.1.8

Author SHA1 Message Date
Alexander Seminjakiw
e524d82784 Merge pull request #4 from fbarresi/master
Fixed variable length for double types
2022-08-21 09:14:44 +02:00
Federico Barresi
21f9b32863 fixed tests 2022-08-05 22:26:58 +02:00
Federico Barresi
f9f0a99672 Fixed variable length for double types
- added default value for variables of type double (float in PLCs)
this error avoid getting notification from type float or double.
2022-08-05 22:21:59 +02:00
Jürgen Holzer
5835fed96f Change to NUnit-console runner 2022-05-06 09:16:19 +02:00
4 changed files with 10 additions and 4 deletions

View File

@@ -18,12 +18,14 @@ jobs:
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 5.0.x dotnet-version: 5.0.x
- name: Install NUnit.ConsoleRunner
run: nuget install NUnit.ConsoleRunner -Version 3.13.0 -DirectDownload -OutputDirectory .
- name: Install dependencies - name: Install dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build
run: dotnet build --configuration Release --no-restore /p:version=1.1.${{ github.run_number }} run: dotnet build --configuration Release --no-restore /p:version=1.1.${{ github.run_number }}
- name: Test - name: Tests
run: dotnet test --no-restore --verbosity normal run: ./NUnit.ConsoleRunner.3.13.0/tools/nunit3-console.exe "Sharp7.Rx.Tests\bin\Release\net461\Sharp7.Rx.Tests.dll"
- name: NugetPublish - name: NugetPublish
run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.1.1.${{ github.run_number }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }} run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.1.1.${{ github.run_number }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}
- name: Create Release - name: Create Release

View File

@@ -31,7 +31,7 @@ Scenario: Parsing variable name for bool
| Db | 5 | 887 | 20 | 0 | String | | Db | 5 | 887 | 20 | 0 | String |
| Db | 506 | 216 | 1 | 0 | Byte | | Db | 506 | 216 | 1 | 0 | Byte |
| Db | 506 | 216 | 5 | 0 | Byte | | Db | 506 | 216 | 5 | 0 | Byte |
| Db | 506 | 216 | 0 | 0 | Double | | Db | 506 | 216 | 4 | 0 | Double |
| Db | 506 | 216 | 4 | 0 | DInteger | | Db | 506 | 216 | 4 | 0 | DInteger |
| Db | 506 | 216 | 2 | 0 | Integer | | Db | 506 | 216 | 2 | 0 | Integer |
| Db | 506 | 216 | 2 | 0 | Integer | | Db | 506 | 216 | 2 | 0 | Integer |

View File

@@ -186,7 +186,7 @@ this.ScenarioInitialize(scenarioInfo);
"Db", "Db",
"506", "506",
"216", "216",
"0", "4",
"0", "0",
"Double"}); "Double"});
table2.AddRow(new string[] { table2.AddRow(new string[] {

View File

@@ -74,6 +74,10 @@ namespace Sharp7.Rx
{ {
s7VariableAddress.Length = 8; s7VariableAddress.Length = 8;
} }
else if (type == DbType.Double)
{
s7VariableAddress.Length = 4;
}
return s7VariableAddress; return s7VariableAddress;
} }