Fixed hex handling of intensity. Added handling for \n, \t, \r and so

forth in tcp,udp and mqtt.
This commit is contained in:
Admin
2017-03-07 16:36:25 -06:00
parent a578aa9fd8
commit f6cb41b880
5 changed files with 29 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ import java.net.UnknownHostException;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.lang3.StringEscapeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,6 +60,7 @@ public class UDPHome implements Home {
sendData = DatatypeConverter.parseHexBinary(theUrlBody.substring(2));
} else {
theUrlBody = BrightnessDecode.calculateReplaceIntensityValue(theUrlBody, intensity, targetBri, targetBriInc, false);
theUrlBody = StringEscapeUtils.unescapeJava(theUrlBody);
sendData = theUrlBody.getBytes();
}
try {