Start implementing complete protocol buffer protocol

This commit is contained in:
2015-07-16 15:57:08 +01:00
parent 0e8f953f0f
commit 676ac1748f
9 changed files with 242 additions and 68 deletions

View File

@@ -6,7 +6,7 @@ import java.io.IOException;
import tm1638.Tm1638.Color;
import tm1638.Tm1638.Command;
import tm1638.Tm1638.Ping;
import tm1638.Tm1638.SetLed;
import tm1638.Tm1638.SetLED;
import base.Duplex;
import com.github.boukefalos.arduino.exception.ArduinoException;
@@ -38,13 +38,13 @@ public class Server extends com.github.boukefalos.arduino.Server {
tm1638.ping(ping.getId());
break;
case SET_LED:
SetLed setLed = command.getSetLed();
logger.debug("Color = " + setLed.getColor().name());
switch (setLed.getColor()) {
SetLED setLED = command.getSetLED();
logger.debug("Color = " + setLED.getColor().name());
switch (setLED.getColor()) {
case RED:
tm1638.setLed(Color.RED, 1);
tm1638.setLED(Color.RED, 1);
case GREEN:
tm1638.setLed(Color.GREEN, 1);
tm1638.setLED(Color.GREEN, 1);
default:
break;
}