cleanup
This commit is contained in:
parent
cac0383251
commit
d8cfca913a
|
@ -21,8 +21,6 @@ public class BuntiClient implements IBuntiClient {
|
||||||
@Override
|
@Override
|
||||||
public void setPar56(final int red, final int green, final int blue) {
|
public void setPar56(final int red, final int green, final int blue) {
|
||||||
|
|
||||||
//if(true) return;
|
|
||||||
|
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -49,8 +47,6 @@ public class BuntiClient implements IBuntiClient {
|
||||||
|
|
||||||
jsonString.append("] }");
|
jsonString.append("] }");
|
||||||
|
|
||||||
System.out.println("bunti request: " + jsonString.toString());
|
|
||||||
|
|
||||||
StringEntity entity = new StringEntity( jsonString.toString(), "UTF-8");
|
StringEntity entity = new StringEntity( jsonString.toString(), "UTF-8");
|
||||||
post.setEntity(entity);
|
post.setEntity(entity);
|
||||||
|
|
||||||
|
@ -73,15 +69,13 @@ public class BuntiClient implements IBuntiClient {
|
||||||
@Override
|
@Override
|
||||||
public void setLampel(final boolean red, final boolean yellow, final boolean green) {
|
public void setLampel(final boolean red, final boolean yellow, final boolean green) {
|
||||||
|
|
||||||
//if(true) return;
|
|
||||||
|
|
||||||
Runnable r = new Runnable() {
|
Runnable r = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
int value = 0;
|
int value = 0;
|
||||||
// if( green ) value |= 0x01;
|
if( green ) value |= 0x01;
|
||||||
// if( yellow ) value |= 0x02;
|
if( yellow ) value |= 0x02;
|
||||||
// if( red ) value |= 0x04;
|
if( red ) value |= 0x04;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Socket client = new Socket("lampel.ctdo.de", 2701);
|
Socket client = new Socket("lampel.ctdo.de", 2701);
|
||||||
|
@ -97,7 +91,7 @@ public class BuntiClient implements IBuntiClient {
|
||||||
|
|
||||||
client.close();
|
client.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.sLog("cannot send to lampel: " + e.getMessage());
|
Logger.sLog("lampel error: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue