mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 04:26:58 +03:00
fix problems with early transition of digits if analog pointers. #921
This commit is contained in:
@@ -192,7 +192,10 @@ int ClassFlowCNNGeneral::ZeigerEvalHybrid(float zahl, float zahl_vorgaenger, int
|
|||||||
if ((zahl_vorgaenger >= 0.5 ) && (zahl_vorgaenger < 9.0))
|
if ((zahl_vorgaenger >= 0.5 ) && (zahl_vorgaenger < 9.0))
|
||||||
{
|
{
|
||||||
// kein Ziffernwechsel, da Vorkomma weit genug weg ist (0+/-0.5) --> zahl wird gerundet
|
// kein Ziffernwechsel, da Vorkomma weit genug weg ist (0+/-0.5) --> zahl wird gerundet
|
||||||
return ((int) round(zahl) + 10) % 10;
|
if ((ergebnis_nachkomma <= 2) || (ergebnis_nachkomma >= 8)) // Band um die Ziffer --> Runden, da Ziffer im Rahmen Ungenauigkeit erreicht
|
||||||
|
return ((int) round(zahl) + 10) % 10;
|
||||||
|
else
|
||||||
|
return ((int) trunc(zahl) + 10) % 10;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user