1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-18 14:31:23 +02:00

color table arrows depending towards the evaluation results, see issue #538

This commit is contained in:
oliexdev
2020-06-17 11:18:28 +02:00
parent b72d1bd2ac
commit 697ac276b4

View File

@@ -453,6 +453,25 @@ public abstract class FloatMeasurementView extends MeasurementView {
}
}
final float evalValue = maybeConvertToOriginalValue(value);
EvaluationSheet evalSheet = new EvaluationSheet(getScaleUser(), dateTime);
evaluationResult = evaluateSheet(evalSheet, evalValue);
if (evaluationResult != null) {
switch (evaluationResult.eval_state) {
case LOW:
color = (diff > 0.0f) ? Color.GREEN : Color.RED;
break;
case HIGH:
color = (diff < 0.0f) ? Color.GREEN : Color.RED;
break;
case NORMAL:
color = Color.GREEN;
break;
}
}
if (newLine) {
text.append('\n');
}