plectrum

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1e9d934d4d12889fc7852b1fd12c76fbd2ac4b4a
parent b17b661ab897317affd1a12b224b85bf1f799946
Author: gstraube <gstraube@mailbox.org>
Date:   Sat, 21 Oct 2017 17:57:06 +0200

Use rounded deviation

Diffstat:
Mapp/src/main/java/com/github/cythara/CanvasPainter.java | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/src/main/java/com/github/cythara/CanvasPainter.java b/app/src/main/java/com/github/cythara/CanvasPainter.java @@ -58,7 +58,7 @@ class CanvasPainter { drawGauge(); - if (pitchDifference != null && Math.abs(pitchDifference.deviation) <= MAX_DEVIATION) { + if (pitchDifference != null && Math.abs(getNearestDeviation()) <= MAX_DEVIATION) { setBackground(); drawIndicator(); @@ -169,7 +169,7 @@ class CanvasPainter { private void setBackground() { int color = Color.RED; - if (Math.abs(pitchDifference.deviation) <= TOLERANCE) { + if (Math.abs(getNearestDeviation()) <= TOLERANCE) { color = Color.GREEN; } background.setColor(color);