You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/08/09 07:33:36 UTC
[plc4x] branch develop updated: - Re-enabled the ADS driver and
temporarily commented out the broken code parts.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 4558c99 - Re-enabled the ADS driver and temporarily commented out the broken code parts.
4558c99 is described below
commit 4558c9988720d0d62479c8930607c6b6d5d0fe21
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Aug 9 09:33:30 2019 +0200
- Re-enabled the ADS driver and temporarily commented out the broken code parts.
---
.../java/ads/protocol/util/LittleEndianDecoder.java | 16 ++++++++++++----
plc4j/protocols/pom.xml | 2 +-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoder.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoder.java
index fb77f44..f8eed41 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoder.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/protocol/util/LittleEndianDecoder.java
@@ -157,7 +157,9 @@ public class LittleEndianDecoder {
case FLOAT: {
LinkedList<Float> values = new LinkedList<>();
while (wrappedBuffer.isReadable()) {
- float aLong = wrappedBuffer.readFloatLE();
+ // FIXME: Commented out till we are able to update to the latest netty version.
+ float aLong = wrappedBuffer.readFloat();
+ //float aLong = wrappedBuffer.readFloatLE();
values.offer(aLong);
}
return new DefaultFloatFieldItem(values.toArray(new Float[0]));
@@ -165,7 +167,9 @@ public class LittleEndianDecoder {
case DOUBLE: {
LinkedList<Double> values = new LinkedList<>();
while (wrappedBuffer.isReadable()) {
- double aLong = wrappedBuffer.readDoubleLE();
+ // FIXME: Commented out till we are able to update to the latest netty version.
+ double aLong = wrappedBuffer.readDouble();
+ //double aLong = wrappedBuffer.readDoubleLE();
values.offer(aLong);
}
return new DefaultDoubleFieldItem(values.toArray(new Double[0]));
@@ -261,7 +265,9 @@ public class LittleEndianDecoder {
case REAL: {
LinkedList<Float> values = new LinkedList<>();
while (wrappedBuffer.isReadable()) {
- float aByte = wrappedBuffer.readFloatLE();
+ // FIXME: Commented out till we are able to update to the latest netty version.
+ float aByte = wrappedBuffer.readFloat();
+ //float aByte = wrappedBuffer.readFloatLE();
values.offer(aByte);
}
return new DefaultFloatFieldItem(values.toArray(new Float[0]));
@@ -269,7 +275,9 @@ public class LittleEndianDecoder {
case LREAL: {
LinkedList<Double> values = new LinkedList<>();
while (wrappedBuffer.isReadable()) {
- double aByte = wrappedBuffer.readDoubleLE();
+ // FIXME: Commented out till we are able to update to the latest netty version.
+ double aByte = wrappedBuffer.readDouble();
+ //double aByte = wrappedBuffer.readDoubleLE();
values.offer(aByte);
}
return new DefaultDoubleFieldItem(values.toArray(new Double[0]));
diff --git a/plc4j/protocols/pom.xml b/plc4j/protocols/pom.xml
index 1543985..6f776b7 100644
--- a/plc4j/protocols/pom.xml
+++ b/plc4j/protocols/pom.xml
@@ -36,7 +36,7 @@
<modules>
<module>driver-bases</module>
- <!--module>ads</module-->
+ <module>ads</module>
<module>delta-v</module>
<module>ethernet-ip</module>
<module>iso-on-tcp</module>