Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 14:24c5d58e8bc6, committed 2019-01-10
- Comitter:
- nerit
- Date:
- Thu Jan 10 10:40:27 2019 +0000
- Parent:
- 13:0ae23132a2b6
- Child:
- 15:2af7ca4c5eb9
- Commit message:
- Versione collaudata il 09-01-2019
Changed in this revision
--- a/main.cpp Tue Jan 08 07:47:07 2019 +0000
+++ b/main.cpp Thu Jan 10 10:40:27 2019 +0000
@@ -184,6 +184,11 @@
}else{
TBmotorDirecti=0;
}
+ #if defined(pcSerial)
+ #if defined(inversione)
+ pc.printf("cambio M %d\n",cambiaStep);
+ #endif
+ #endif
}
//*******************************************************
// aggiornamento parametri di lavoro fissi e da Tritecnica
@@ -347,7 +352,7 @@
}else if (TBmotorSteps==1600){
TBmotor_M1=0;
TBmotor_M2=1;
- TBmotor_M3=1;
+ TBmotor_M3=0;
}else if (TBmotorSteps==3200){
TBmotor_M1=1;
TBmotor_M2=0;
@@ -1183,7 +1188,7 @@
#if defined(provaStepper)
TBmotorRst=0;
TBticker.attach_us(&step_TBPulseOut,250.0f); // clock time are seconds and attach seed motor stepper controls
- //TATicker.attach(&inverti,2.5f);
+ TATicker.attach(&inverti,2.0f);
#endif // end prova stepper
#if defined(canbusActive)
@@ -1501,6 +1506,11 @@
#endif
}
if ((double)TBactualPosition > ((TBgiroStep/cellsNumber)*1.2f)&&(erroreTamburo==0)){
+ #if defined(pcSerial)
+ #if defined(inversione)
+ pc.printf("TBact: %d TBgiro: %f \n",TBactualPosition,TBgiroStep);
+ #endif
+ #endif
if (firstStart==0){
if (cntTbError>2){
all_cellSignal=1;
--- a/main.hpp Tue Jan 08 07:47:07 2019 +0000 +++ b/main.hpp Thu Jan 10 10:40:27 2019 +0000 @@ -25,6 +25,7 @@ //#define pcSerial +//#define inversione //#define laq //#define Qnca //#define quinca
--- a/parameters.hpp Tue Jan 08 07:47:07 2019 +0000 +++ b/parameters.hpp Thu Jan 10 10:40:27 2019 +0000 @@ -14,8 +14,8 @@ double deepOfSeed=0.00f; // deep of seeding double oldSeedWheelPeriod=0.0f; -double pickNumber = 15.0f; // numero di becchi installati sulla ruota di semina -double cellsNumber = 15.0f; // numero di celle del tamburo +double pickNumber = 20.0f; // numero di becchi installati sulla ruota di semina +double cellsNumber = 20.0f; // numero di celle del tamburo double TBmotorSteps = 1600.0f; // TB wheel motor steps without reduction (defined from driver) double TBreductionRatio = 1.65625f; // TB mechanical reduction ratio @@ -46,5 +46,5 @@ double minSeedSpeed=0.22f; // attiva il LowSpeed mt/s (0,28 = 1,0KmH) double speedForCorrection=0.25f; int cicliAspettaStart = 2; -double avvioGradi=5.0f; -double angoloFase = 7.0f; +double avvioGradi=4.0f; +double angoloFase = 2.0f;
--- a/variables.hpp Tue Jan 08 07:47:07 2019 +0000
+++ b/variables.hpp Thu Jan 10 10:40:27 2019 +0000
@@ -5,9 +5,10 @@
// SET INIZIALI DI MACCHINA
bool canDataCheckEnable=false; // a true per attivare il controllo del quinconce anche con dati CAN
int speedFromPick = 0; // definisce se il controllo di velocità della ruota di semina è gestita dai becchi (set a 1) o dai fori sul disco (set a 0)
-bool encoder; // true quando montato motore DC con encoder incorporato
+bool encoder=true; // true quando montato motore DC con encoder incorporato
// NOTA: SE ENCODER=TRUE ALLORA SPEEDFROMPICK DEVE ESSERE MESSO A 0
int tamburoStandard=1; // a 1 per tamburo parallelo alla ruota di semina, a 0 per zucca
+int cambiaStep=0;
bool tankLevelEnable = false;
bool seedSensorEnable=false;