This commit is contained in:
@@ -81,6 +81,24 @@ public class Puck extends DeviceBase {
|
||||
final static Double minispineLedSize = 8.0;
|
||||
final static PointDouble labelPositionWithImage = new PointDouble(0.0, 36.0);
|
||||
|
||||
|
||||
ImageDetection imageDetection = null;
|
||||
|
||||
public ImageDetection getImageDetection(){
|
||||
return imageDetection;
|
||||
}
|
||||
|
||||
public void setImageDetection(ImageDetection value){
|
||||
imageDetection = value;
|
||||
}
|
||||
|
||||
public enum ImageDetection{
|
||||
Empty,
|
||||
Minispine,
|
||||
Unipuck,
|
||||
Error,
|
||||
}
|
||||
|
||||
public double getAngle() {
|
||||
return ANGLES[index];
|
||||
}
|
||||
@@ -279,7 +297,22 @@ public class Puck extends DeviceBase {
|
||||
ret = isHighlithted() ? new Color(224, 224, 224) : Color.LIGHT_GRAY;
|
||||
break;
|
||||
case Present:
|
||||
ret = isHighlithted() ? new Color(0, 140, 140) : new Color(128, 192, 192);
|
||||
if (imageDetection != null){
|
||||
switch (imageDetection){
|
||||
case Minispine:
|
||||
ret = isHighlithted() ? new Color(0, 200, 80) : new Color(128, 232, 152);
|
||||
break;
|
||||
case Unipuck:
|
||||
ret = isHighlithted() ? new Color(0, 140, 140) : new Color(128, 192, 192);
|
||||
break;
|
||||
case Empty:
|
||||
case Error:
|
||||
ret = isHighlithted() ? new Color(192, 10, 10) : new Color(192, 128, 128);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ret = isHighlithted() ? new Color(0, 140, 140) : new Color(128, 192, 192);
|
||||
}
|
||||
break;
|
||||
case Error:
|
||||
ret = isHighlithted() ? new Color(192, 10, 10) : new Color(192, 128, 128);
|
||||
|
||||
Reference in New Issue
Block a user