This commit is contained in:
pgp 2021-02-02 08:34:39 +01:00
parent 151f7d5d29
commit 309a4cedb2

View file

@ -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 = {
@ -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];