a.binder 5 anos atrás
pai
commit
bd04c3f694
20 arquivos alterados com 37 adições e 28 exclusões
  1. 20 19
      SE/stuff/P5_Automation_can-dev-res/P5_Automation_can-dev-res.ino
  2. 13 7
      SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_func.h
  3. 0 0
      SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_add_record_func.h
  4. 2 2
      SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_func.h
  5. 0 0
      SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_init.h
  6. 0 0
      SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_queue_pop_func.h
  7. 2 0
      SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_struct.h
  8. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_PortStates_struct.h
  9. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_PortTypes_struct.h
  10. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_Broadcast_state_struct.h
  11. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_Exp_state_ttl_struct.h
  12. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_I2C_driver_struct.h
  13. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_ID_sruct.h
  14. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_Slave_Ports_Status_struct.h
  15. 0 0
      SE/stuff/P5_Automation_can-dev-res/__PORTS/_TASK_TYPES_struct.h
  16. 0 0
      SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_Status_QUEUE_add_func.h
  17. 0 0
      SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_Status_QUEUE_func.h
  18. 0 0
      SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_action_func.h
  19. 0 0
      SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_broadcast_func.h
  20. 0 0
      SE/stuff/P5_Automation_can-dev-res/__icon/__icon.h

+ 20 - 19
SE/stuff/P5_Automation_can-dev-res/P5_Automation_can-dev-res.ino

@@ -101,8 +101,8 @@
 #define ENABLE_DISPLAY_MENU
 //#define DISABLE_ANY_PRINT //when uno ?
 #define DISPLAY_MENU_SELECTOR_DEBUG 
-#define DISPLAY__print_menu_DELAY 500 
-
+//#define DISPLAY__print_menu_DELAY 500 
+#define DISABLE_TASK_TYPE_T_Broadcast_state_LOW
 
 #define Sprintln(a) (Serial.println(a))
 /*
@@ -149,6 +149,7 @@ etc. To deactivate the Serial printing, define the macro empty:
 #include "___main/__main_auto.h"
 #include "___main/__main_register.h"
 #include "___main/__main_extern.h"
+#include "__icon/__icon.h"
 
 #include "___template/__STORAGE_ARRAY_func.h" //testing
 
@@ -207,10 +208,10 @@ etc. To deactivate the Serial printing, define the macro empty:
 #if defined(HAS_TFT_ILI9163C)
     #include "_TFT_ILI9163C_config.h"
 #endif
-#include "_DISPLAY_struct.h"
-#include "_Port_ID_sruct.h"
+#include "__DISPLAY/_DISPLAY_struct.h"
+#include "__PORTS/_Port_ID_sruct.h"
 
-#include "_TASK_TYPES_struct.h"
+#include "__PORTS/_TASK_TYPES_struct.h"
 #include "_Slave_Ports_Status_QUEUE_struct.h"
 //#include "Slave_Ports_Status_QUEUE.h"
 
@@ -280,12 +281,12 @@ etc. To deactivate the Serial printing, define the macro empty:
 
 
  //REMOTE PORTS DEFINITIONS
- #include "_PortTypes_struct.h"
- #include "_PortStates_struct.h"
- #include "_Port_Exp_state_ttl_struct.h"
- #include "_Port_Broadcast_state_struct.h"
- #include "_Port_I2C_driver_struct.h"
- #include "_Slave_Ports_Status_struct.h"
+ #include "__PORTS/_PortTypes_struct.h"
+ #include "__PORTS/_PortStates_struct.h"
+ #include "__PORTS/_Port_Exp_state_ttl_struct.h"
+ #include "__PORTS/_Port_Broadcast_state_struct.h"
+ #include "__PORTS/_Port_I2C_driver_struct.h"
+ #include "__PORTS/_Slave_Ports_Status_struct.h"
  #include "_CAN/_Slave_Ports_Protocol_CAN_struct.h"
  
  #if defined(HAS_TFT_ILI9163C)
@@ -298,9 +299,9 @@ etc. To deactivate the Serial printing, define the macro empty:
     #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_func.h"
 #endif
 #include "_TASK_TYPES_func.h"
-#include "_Slave_Ports_Status_QUEUE_add_func.h"
-#include "_DISPLAY_add_record_func.h"
-#include "_DISPLAY_func.h"
+#include "__QUEUE/_Slave_Ports_Status_QUEUE_add_func.h"
+#include "__DISPLAY/_DISPLAY_add_record_func.h"
+#include "__DISPLAY/_DISPLAY_func.h"
 
 #if defined(HAS_LCD1602)
   #include "_LCD1602_func.h"
@@ -318,12 +319,12 @@ etc. To deactivate the Serial printing, define the macro empty:
 #include "_time_func.h"
 
 #include "_Slave_Ports_ttl_decrement_func.h"
-#include "_Slave_Ports_broadcast_func.h"
+#include "__QUEUE/_Slave_Ports_broadcast_func.h"
 #include "_Slave_Ports_I2C_func.h"
-#include "_Slave_Ports_action_func.h"
+#include "__QUEUE/_Slave_Ports_action_func.h"
 
-#include "_DISPLAY_queue_pop_func.h"
-#include "_Slave_Ports_Status_QUEUE_func.h"
+#include "__DISPLAY/_DISPLAY_queue_pop_func.h"
+#include "__QUEUE/_Slave_Ports_Status_QUEUE_func.h"
 
 #include "_Slave_Ports_Protocol_CAN_func.h"
 #include "_Slave_Ports_Status_func.h"
@@ -353,7 +354,7 @@ etc. To deactivate the Serial printing, define the macro empty:
 #endif
 
  
-#include "_DISPLAY_init.h"
+#include "__DISPLAY/_DISPLAY_init.h"
 
 
   

+ 13 - 7
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_func.h

@@ -94,10 +94,11 @@
                                           Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A , 
                                           i);//Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_INDEX_NEXT_A
                   
-                  
+                  #if defined(DISABLE_TASK_TYPE_T_Broadcast_state_LOW)
+                  #else
                    _Slave_Ports_queue__add(  Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
                      TASK_TYPE_T_Broadcast_state_LOW______  ,TASK_PORT_ASSOC_EMPTY ,time_seq_id, time_seq_id + 50000  , ARDUINO_ARRAY_INDEX_NOT_SET ) ;
-                     
+                  #endif
                      
                } else {
                     //duplicated
@@ -154,11 +155,15 @@
                     
                     
                      
-                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i_pos].DISPLAY_CURSOR_X_CHARS_A =  0 ;
-                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i_pos].DISPLAY_CURSOR_Y_CHARS_A = 0 ;
-                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i_pos].DISPLAY_string_A = title ;// "Ports"; //DISPLAY_string_A ;
-                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i_pos].DISPLAY_COLOR_A =  0x0004 ;
-                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i_pos].DISPLAY_MENU_ITEM_FLAG_A = DISPLAY_MENU_ITEM_FLAG_INITIALIZED  ;
+                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[1].DISPLAY_CURSOR_X_CHARS_A =  0 ;
+                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[1].DISPLAY_CURSOR_Y_CHARS_A = 0 ;
+
+                     title.toCharArray(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[1].DISPLAY_char_A, title.length() + 1);
+                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[1].DISPLAY_string_A = "NULL_SHB" ;// "Ports"; //DISPLAY_string_A ;
+                     
+                     
+                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[1].DISPLAY_COLOR_A =  0x0004 ;
+                     DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[1].DISPLAY_MENU_ITEM_FLAG_A = DISPLAY_MENU_ITEM_FLAG_INITIALIZED  ;
                            
        
        
@@ -248,6 +253,7 @@
                      DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].DISPLAY_CURSOR_X_CHARS_A =  0 ;
                      DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].DISPLAY_CURSOR_Y_CHARS_A = i ;
                      DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].DISPLAY_string_A = message2 ;
+message2.toCharArray(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].DISPLAY_char_A, message2.length() + 1);
                      DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].DISPLAY_COLOR_A = BLACK  ;
                      DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].DISPLAY_MENU_ITEM_FLAG_A = DISPLAY_MENU_ITEM_FLAG_INITIALIZED  ;
                      DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[1].DISPLAY_MENU_ITEM_A[i+1].ARDUINO_ARRAY_INDEX_A = i  ;

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_DISPLAY_add_record_func.h → SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_add_record_func.h


+ 2 - 2
SE/stuff/P5_Automation_can-dev-res/_DISPLAY_func.h → SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_func.h

@@ -436,7 +436,7 @@ void DISPLAY__print_menu(DISPLAY_T* DISPLAY_A ,
                                    DISPLAY_DEV.setCursor(minXi , maxYi ); //[ARDUINO_ATTR_ARRAY_S_INDEX]
                                  // Serial.print(" SetCursorY["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_CURSOR_Y_CHARS_A * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A); Serial.print("] ");
                                    
-                                    DISPLAY_DEV.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_string_A);
+                                    DISPLAY_DEV.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_char_A);
                                     //DISPLAY_DEV.print("test 123");
                                   
                               } 
@@ -456,7 +456,7 @@ void DISPLAY__print_menu(DISPLAY_T* DISPLAY_A ,
 #endif
 
 
-#include "_Slave_Ports_action_func.h"
+#include "../__QUEUE/_Slave_Ports_action_func.h"
 
    #if defined(HAS_TFT_ILI9163C) 
 

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_DISPLAY_init.h → SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_init.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_DISPLAY_queue_pop_func.h → SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_queue_pop_func.h


+ 2 - 0
SE/stuff/P5_Automation_can-dev-res/_DISPLAY_struct.h → SE/stuff/P5_Automation_can-dev-res/__DISPLAY/_DISPLAY_struct.h

@@ -116,6 +116,7 @@ typedef struct DISPLAY_MENU_SELECTOR_S DISPLAY_MENU_SELECTOR_T ;
 
 typedef byte DISPLAY_MENU_ITEM_Exp_state_level_T ;
 
+typedef char DISPLAY_char_T[] ;
 
 struct DISPLAY_MENU_ITEM_S { //elementy menu
      DISPLAY_MENU_ITEM_FLAG_T DISPLAY_MENU_ITEM_FLAG_A = DISPLAY_MENU_ITEM_FLAG_EMPTY ; //czy nie jest do usuniecia itp ...
@@ -128,6 +129,7 @@ struct DISPLAY_MENU_ITEM_S { //elementy menu
      time_min_run_T time_min_run_A ;  //to controll latency
      DISPLAY_MENU_ITEM_Exp_state_level_T  Exp_state_level_A ;
      ARDUINO_ARRAY_INDEX_T ARDUINO_ARRAY_INDEX_A ; //index do czegos - portu
+      DISPLAY_char_T DISPLAY_char_A;
 } ;
 
 typedef struct DISPLAY_MENU_ITEM_S DISPLAY_MENU_ITEM_T ;

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_PortStates_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_PortStates_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_PortTypes_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_PortTypes_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Port_Broadcast_state_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_Broadcast_state_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Port_Exp_state_ttl_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_Exp_state_ttl_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Port_I2C_driver_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_I2C_driver_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Port_ID_sruct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_Port_ID_sruct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_Slave_Ports_Status_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_TASK_TYPES_struct.h → SE/stuff/P5_Automation_can-dev-res/__PORTS/_TASK_TYPES_struct.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_QUEUE_add_func.h → SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_Status_QUEUE_add_func.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_QUEUE_func.h → SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_Status_QUEUE_func.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_action_func.h → SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_action_func.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_broadcast_func.h → SE/stuff/P5_Automation_can-dev-res/__QUEUE/_Slave_Ports_broadcast_func.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/__icon/__icon.h