para el ventilador

Dependencies:   QEI FastPWM

Revision:
6:d38287621cca
Parent:
2:6f618b905d4f
Child:
7:f4e248182d31
--- a/ventilator.cpp	Sun Apr 19 05:38:41 2020 +0000
+++ b/ventilator.cpp	Mon Apr 20 11:39:30 2020 +0000
@@ -6,7 +6,7 @@
 #include "project_defines.h"
 #include "buttons.h"
 #include "encoder_interface.h"
-#include "tft_interface.h"
+#include "nextion_interface.h"
 #include "ventilator.h"
 
 
@@ -24,7 +24,7 @@
 uint8_t first_time_in_state = 1;
 
 /* Function definition */
-void TFT_Encoder_Interaction(void){
+void Nextion_Encoder_Interaction(void){
 
  switch(main_screen_state){
             case Main_Screen_Cursor_Disable:
@@ -57,6 +57,10 @@
             case Main_Screen_Volume_Setpoint_Adjust:
                 if(first_time_in_state){
                     first_time_in_state = 0;
+                    nextion_display.printf("t6.pco=%d", ADJUST_COLOR); // Change font color
+                    nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff);
+                    pc.printf("t6.pco=%d\n\r", ADJUST_COLOR); // Change font color
+                    pc.printf("%c%c%c\n\r", 0xff, 0xff, 0xff);
                     Volume_Setpoint_Display_Update();
                 }else if(volume_setpoint_index_change_flag){
                     volume_setpoint_index_change_flag = 0; 
@@ -77,6 +81,10 @@
             case Main_Screen_Resp_Frequency_Adjust:
                 if(first_time_in_state){
                     first_time_in_state = 0;
+                    nextion_display.printf("t7.pco=%d", ADJUST_COLOR); // Change font color
+                    nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff);
+                    pc.printf("t7.pco=%d\n\r", ADJUST_COLOR); // Change font color
+                    pc.printf("%c%c%c\n\r", 0xff, 0xff, 0xff);
                     Resp_Frequency_Display_Update();
                 }else if(resp_frequency_index_change_flag){
                     resp_frequency_index_change_flag = 0; 
@@ -89,7 +97,7 @@
                     main_screen_state = Main_Screen_Cursor_Disable;
                     first_time_in_state = 1;
                     Resp_Frequency_Fix();
-                    Parameter_Selection_Box_Remove();
+                    Parameter_Selection_Box_Remove(); 
                 }
                 
                 break;         
@@ -98,6 +106,10 @@
             case Main_Screen_I_E_Ratio_Adjust:
                 if(first_time_in_state){
                     first_time_in_state = 0;
+                    nextion_display.printf("t8.pco=%d", ADJUST_COLOR); // Change font color
+                    nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff);
+                    pc.printf("t8.pco=%d\n\r", ADJUST_COLOR); // Change font color
+                    pc.printf("%c%c%c\n\r", 0xff, 0xff, 0xff);
                     I_E_Ratio_Display_Update();
                 }else if(i_e_ratio_index_change_flag){
                     i_e_ratio_index_change_flag = 0; 
@@ -118,6 +130,5 @@
             default:
                 break;
                 
-        }
-        
+        }   
  }       
\ No newline at end of file