Messa in campo 4 file - 26/06/2020 Francia
Dependencies: mbed X_NUCLEO_IHM03A1_for
Fork of FORIGO_Modula_V7_3_VdcStep_maggio2020 by
Diff: main.cpp
- Revision:
- 34:eb04f4f41dfd
- Parent:
- 33:81b406a911b6
- Child:
- 35:3165f4c1c7bf
diff -r 81b406a911b6 -r eb04f4f41dfd main.cpp --- a/main.cpp Thu Jun 20 08:35:20 2019 +0000 +++ b/main.cpp Wed Mar 11 09:35:36 2020 +0000 @@ -195,6 +195,7 @@ //while(true){ /* Get current position of device and print to the console */ TBpassPosition= (uint32_t) motor->get_position(); + ildato=TBpassPosition; if (TBpassPosition >= TBoldPosition){ TBactualPosition= ((TBpassPosition-TBoldPosition)*TBreductionRatio);//*10; }else{ @@ -226,7 +227,7 @@ TBperiod=5.2f*TBrpm*2.0f; //prova dopo test con contagiri #else if (cellsNumber<8.0f){ - TBperiod=4.8f*TBrpm;//4.8f*TBrpm; //prova dopo test con contagiri + TBperiod=6.2f*TBrpm;//4.8f*TBrpm; //prova dopo test con contagiri }else{ TBperiod=5.2f*TBrpm; //prova dopo test con contagiri } @@ -1982,6 +1983,9 @@ pc.printf("TBoldPos: %d\n",TBoldPosition); #endif #endif + #if defined(perProva) + pc.printf(" ildato %d Actual %d\n", ildato, TBactualPosition); + #endif #else TBactualPosition=0; @@ -2318,15 +2322,15 @@ correzione = correzione + memoCorrezione; if (correzione > (1.0f - dutyTeorico)) { correzione = (1.0f - dutyTeorico); - #if defined(pcSerial) - pc.printf("limite\n"); - #endif + //#if defined(pcSerial) + // pc.printf("limite\n"); + //#endif } if ((correzione < 0.0f)&&(dutyTeorico+correzione<0.0f)) { correzione = -1.0f*dutyTeorico; - #if defined(pcSerial) - pc.printf("limite\n"); - #endif + //#if defined(pcSerial) + // pc.printf("limite\n"); + //#endif } } pulseRised1=0;