mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 20:46:52 +03:00
digit will be roundet now from x.7..x.9 out of transition of the pointer
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
static const char* TAG = "flow_analog";
|
||||
|
||||
bool debugdetailgeneral = true;
|
||||
bool debugdetailgeneral = false;
|
||||
|
||||
ClassFlowCNNGeneral::ClassFlowCNNGeneral(ClassFlowAlignment *_flowalign, t_CNNType _cnntype) : ClassFlowImage(NULL, TAG)
|
||||
{
|
||||
@@ -239,7 +239,7 @@ int ClassFlowCNNGeneral::ZeigerEvalAnalogToDigitNeu(float zahl, float ziffer_vor
|
||||
|
||||
// Ziffer bleibt bei x.8 oder x.9 "hängen", kommt also nicht richtig auf x.0
|
||||
// muss eine Rundung erfolgen
|
||||
if (eval_vorgaenger<8 && ergebnis_nachkomma >= 8)
|
||||
if (eval_vorgaenger<8 && ergebnis_nachkomma >= 7)
|
||||
result = ((int) round(zahl) + 10) % 10;
|
||||
else
|
||||
result = ergebnis_vorkomma;
|
||||
|
||||
Reference in New Issue
Block a user