mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 22:38:27 +08:00
Add boolean support to GetPackage
This commit is contained in:
@@ -15,6 +15,8 @@ namespace S7.Net.Protocol
|
||||
{
|
||||
switch (value.GetType().Name)
|
||||
{
|
||||
case "Boolean":
|
||||
return new[] {(byte) ((bool) value ? 1 : 0)};
|
||||
case "Byte":
|
||||
return Types.Byte.ToByteArray((byte) value);
|
||||
case "Int16":
|
||||
|
||||
Reference in New Issue
Block a user