This commit is contained in:
Lucas Pleß 2012-06-01 17:06:17 +02:00
parent cac0383251
commit d8cfca913a
1 changed files with 4 additions and 10 deletions

View File

@ -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());
}
}
};