tests
This commit is contained in:
parent
151f7d5d29
commit
309a4cedb2
17
src/main.cpp
17
src/main.cpp
|
@ -142,7 +142,7 @@ void stop_moteur() {
|
|||
|
||||
void start_compteur() {
|
||||
|
||||
esp_err_t error;
|
||||
//esp_err_t error;
|
||||
Serial.println("Initialisation du compteur");
|
||||
|
||||
pcnt_config_t pcnt_config = {
|
||||
|
@ -180,7 +180,7 @@ void compte_tour() {
|
|||
sema_compte_tour = true;
|
||||
depart_compte_tour = millis();
|
||||
}
|
||||
int offset = (millis() - depart_compte_tour );
|
||||
int offset = ( millis() - depart_compte_tour );
|
||||
|
||||
if (offset >= intervalle_compte_tour && sema_compte_tour == true){
|
||||
//chrono_compte_tour = millis()- start_chrono_scribe;
|
||||
|
@ -188,12 +188,12 @@ void compte_tour() {
|
|||
int diff_count = count - old_count;
|
||||
vRotReel = (60000*diff_count/(pptr*offset)); //vitesse en tours par min (4 pulsations /tour, 2 montantes, 2 descendantes)
|
||||
old_count = count;
|
||||
Serial.println("count =");
|
||||
Serial.println(count);
|
||||
//Serial.println("count =");
|
||||
//Serial.println(count);
|
||||
//Serial.println("chrono_compte_tour=");
|
||||
//Serial.println(chrono_compte_tour);
|
||||
Serial.println("vRrotReel=");
|
||||
Serial.println(vRotReel);
|
||||
//Serial.println("vRrotReel=");
|
||||
//Serial.println(vRotReel);
|
||||
gaz_moteur();// ajustement des gaz en fonction de la vitesse mesurée
|
||||
sema_compte_tour = false;
|
||||
}
|
||||
|
@ -339,11 +339,12 @@ void scribe_sd (){
|
|||
start_chrono_scribe = millis();
|
||||
}
|
||||
chrono_scribe = millis() - start_chrono_scribe;
|
||||
|
||||
//Serial.println("sem_scribe=");
|
||||
//Serial.println(sem_scribe);
|
||||
|
||||
if (chrono_scribe >= intervalle_d_ecriture ){
|
||||
//Serial.println("balise scribe");
|
||||
if ( sem_scribe == true && chrono_scribe >= intervalle_d_ecriture ) {
|
||||
Serial.println("balise scribe");
|
||||
char timestamp[] = "YY-MM-DD-hh:mm:ss";
|
||||
char *horodatage = now.toString(timestamp);
|
||||
char buffer[64];
|
||||
|
|
Loading…
Reference in a new issue