check for missing bg direction

This commit is contained in:
Milos Kozak 2017-06-28 09:09:19 +02:00
parent 42b42a90eb
commit 5c5c4243bc

View file

@ -69,7 +69,9 @@ public class BgReading implements DataPointWithLabelInterface {
public String directionToSymbol() { public String directionToSymbol() {
String symbol = ""; String symbol = "";
if (direction.compareTo("DoubleDown") == 0) { if (direction == null) {
symbol = "??";
} else if (direction.compareTo("DoubleDown") == 0) {
symbol = "\u21ca"; symbol = "\u21ca";
} else if (direction.compareTo("SingleDown") == 0) { } else if (direction.compareTo("SingleDown") == 0) {
symbol = "\u2193"; symbol = "\u2193";