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