Forigo / Mbed 2 deprecated FORIGO_Modula_V7_3_VdcStep_Modula2021

Dependencies:   mbed X_NUCLEO_IHM03A1_for

Revision:
26:77955c5d16a3
Parent:
25:4461bc76aaab
Child:
27:3d382b6e60ba
--- a/main.cpp	Sat May 18 10:47:40 2019 +0000
+++ b/main.cpp	Sat May 18 14:47:48 2019 +0000
@@ -1971,7 +1971,8 @@
                 // ciclo conteggio celle per carico manuale
                 if (loadDaCanInCorso==1) {
                     cntCellsForLoad++;
-                    if (cntCellsForLoad >= 10) {
+                    double cellsToCount = ceil(((360.0f/cellsNumber)*180.0f)+1.0f);
+                    if (cntCellsForLoad >= cellsToCount) {
                         stopCicloTB=1;
                         cntCellsForLoad=0;
                     }