30/5/2018 _a

Dependencies:   BSP_DISCO_F469NI LCD_DISCO_F469NI Shifter2 TS_DISCO_F469NI max31865 mbed

Files at this revision

API Documentation at this revision

Comitter:
billycorgan123
Date:
Fri Jun 01 10:56:20 2018 +0000
Parent:
0:c980456a5562
Commit message:
Project ORBE ver 2.a

Changed in this revision

functions.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
version.txt Show annotated file Show diff for this revision Revisions of this file
diff -r c980456a5562 -r 309cda84edd4 functions.h
--- a/functions.h	Wed May 30 14:59:27 2018 +0000
+++ b/functions.h	Fri Jun 01 10:56:20 2018 +0000
@@ -102,7 +102,7 @@
     lcd.SetBackColor(light_sky_blue);
     lcd.SetFont(&Font24);
     lcd.SetTextColor(black);
-    lcd.DisplayStringAt(670, LINE(0), (uint8_t *)"Ver 2.0", LEFT_MODE);
+    lcd.DisplayStringAt(670, LINE(0), (uint8_t *)"Ver 2.a", LEFT_MODE);
     Lampadina_acceso();
     wait(0.1);
     Lampadina_spento();
@@ -178,7 +178,7 @@
     }
     
     //per prova da togliere dopo
-    for (int i=7; i>=0; i--) {  // D7,D6,.....,D1,D0
+    for (int i=3; i>=0; i--) {  // D7,D6,.....,D1,D0
         sprintf((char*)text, "%d", myDataIn[0+i]);
         lcd.DisplayStringAt(580+20*i,LINE(8), (uint8_t *)&text, LEFT_MODE);
     }
@@ -405,9 +405,10 @@
         lcd.DisplayStringAt(10, LINE(18), (uint8_t *)"CLOSE THE  DOOR PLEASE   ", LEFT_MODE);
         stato_porta=1;
     }
-    lcd.DisplayStringAt(10, LINE(18), (uint8_t *)"                         ", LEFT_MODE);
-*/    
+    lcd.DisplayStringAt(10, LINE(18), (uint8_t *)"                         ", LEFT_MODE);  
     return stato_porta;
+    */
+    return 0;
 }
 //------------------------------------------------------------------------------
 ///Tappo caffè
diff -r c980456a5562 -r 309cda84edd4 main.cpp
--- a/main.cpp	Wed May 30 14:59:27 2018 +0000
+++ b/main.cpp	Fri Jun 01 10:56:20 2018 +0000
@@ -115,10 +115,10 @@
         //per sicurezza, se accendo la macchina e la temperatura è superiore a 
         //quella di safe (150) attivo la ventola tangenziale fino a quando la 
         //temperatura non scende sotto quella di sicurezza
-        if (PT1.temperature( )>temp_safe) {
+        if (PT1.temperature( )>temp_safe || PT2.temperature( )>temp_safe) {
             VTangenziale_acceso();
             temperature_update();
-            wait(1.0);
+            wait(0.4);
         }
         wait(0.1);
     }
@@ -233,7 +233,7 @@
         Ventola_spento();
     }
     //lcd.DisplayStringAt(10, LINE(18), (uint8_t *)"tempe magg o minore 150  ", LEFT_MODE);
-    if (PT1.temperature( )>temp_safe) {
+    if (PT1.temperature( )>temp_safe || PT2.temperature( )>temp_safe) {
         do {
             getData();
             lcd.SetTextColor(red);
@@ -301,7 +301,7 @@
     VRadiale_acceso();
     VTangenziale_acceso();
     Lampadina_acceso();
-    while ( PT1.temperature()<=roast_temp && step_roast==0) {
+    while ( PT2.temperature()<=roast_temp && step_roast==0) {
         //if STOP pressed
         ts.GetState(&TS_State);
         if ( (TS_State.touchDetected) && (TS_State.touchX[0]>=20 && TS_State.touchX[0]<140 && TS_State.touchY[0]>=20 && TS_State.touchY[0]<140))    {
@@ -326,10 +326,10 @@
         }
         getData();
         temperature_update();
-        if (PT1.temperature( )<=roast_temp)  {
+        if (PT2.temperature( )<=roast_temp)  {
             Resistenza1_acceso();
         }
-        if (PT1.temperature( )>roast_temp)  {
+        if (PT2.temperature( )>roast_temp)  {
             Resistenza1_spento();
         }
         wait(1.0);
@@ -345,10 +345,10 @@
         }
         getData();
         temperature_update();
-        if (PT1.temperature( )<=roast_temp)  {
+        if (PT2.temperature( )<=roast_temp)  {
             Resistenza1_acceso();
         }
-        if (PT1.temperature( )>roast_temp)  {
+        if (PT2.temperature( )>roast_temp)  {
             Resistenza1_spento();
         }
         wait(1.0);
@@ -380,10 +380,10 @@
 
             getData();
             temperature_update();
-            if (PT1.temperature( )<=roast_temp)  {
+            if (PT2.temperature( )<=roast_temp)  {
                 Resistenza1_acceso();
             }
-            if (PT1.temperature( )>roast_temp)  {
+            if (PT2.temperature( )>roast_temp)  {
                 Resistenza1_spento();
             }
         }
diff -r c980456a5562 -r 309cda84edd4 version.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/version.txt	Fri Jun 01 10:56:20 2018 +0000
@@ -0,0 +1,4 @@
+/*
+version 2.1
+temperatura roast messa su T2, prima era T1, temperatura lean lasciata invariata su T1.
+main, controllo temperatura maggiore di 150gradi, portato wait interno da 1.0 a 0.4 
\ No newline at end of file