|
|
@@ -1,183 +0,0 @@
|
|
|
-
|
|
|
-//static ARDUINO_LOOP_LATENCY_T ARDUINO_LOOP_LATENCY__MAIN_END_A = 10000 ; //EVERY 10 LOOPS INIT THIS LATENCY
|
|
|
-
|
|
|
-if(TASK_TYPE_T_Get_Ports_Status_INPUT_A___INIT == true){
|
|
|
- TASK_TYPE_T_Get_Ports_Status_INPUT_A___LOOP();
|
|
|
-}
|
|
|
-
|
|
|
- _Slave_Ports_queue__POP(
|
|
|
- Slave_Ports_Status_QUEUE_A,
|
|
|
- Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- /* GARBAGE_TO_REMOVE_ASSOC_EMPTY , //_Slave_Ports_queue_count,
|
|
|
- GARBAGE_TO_REMOVE_ASSOC_EMPTY , //_Slave_Ports_queue_pop,
|
|
|
- GARBAGE_TO_REMOVE_ASSOC_EMPTY , //_Slave_Ports_queue_front,
|
|
|
- GARBAGE_TO_REMOVE_ASSOC_EMPTY, //_Slave_Ports_queue_back,
|
|
|
- GARBAGE_TO_REMOVE_ASSOC_EMPTY,// _Slave_Ports_queue_peek,
|
|
|
- */
|
|
|
- LCDtim,
|
|
|
-
|
|
|
- Slave_Ports_Status_A ,
|
|
|
- Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_TABLE_A,
|
|
|
- Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_A,
|
|
|
- Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_A
|
|
|
- ,
|
|
|
- DISPLAY_A ,
|
|
|
- DISPLAY_T_ARDUINO_ATTR_ARRAY_A,
|
|
|
- DISPLAY_PHYSICAL_CHAR_A,
|
|
|
- Adafruit_PWMServoDriver_A, 0 //time
|
|
|
- );
|
|
|
-
|
|
|
-if(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END(ARDUINO_LOOP_LATENCY__MAIN_END_A, ARDUINO_LOOP_LATENCY_CONTROL_FLAG_NONE ) <= ARDUINO_LOOP_LATENCY_COUNTER_INIT ) {
|
|
|
- #if defined(DEBUG_LATENCY_MARKER)
|
|
|
- Serial.print("=E=");
|
|
|
- #endif
|
|
|
- #if defined(DISABLE_LOOP) || defined(DEBUG)
|
|
|
- if(DEBUG_ACTION_TRIG != DEBUG_LAST_ACTION_TRIG) {
|
|
|
- Serial.print("#4 main_loop_end will _Slave_Ports_queue__list");
|
|
|
- }
|
|
|
- #endif
|
|
|
-
|
|
|
- #ifndef DISABLE_LOOP
|
|
|
- #if defined(DEBUG_ACTION_TRIG_ENABLED)
|
|
|
- Serial.print("#11534 DEBUG_ACTION_TRIG[");Serial.print(DEBUG_ACTION_TRIG);
|
|
|
- #endif
|
|
|
- // Serial.print("] COUNTER__MAIN_A["); Serial.print(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A);
|
|
|
-
|
|
|
- #if defined(DEBUG_QUEUE)
|
|
|
- _Slave_Ports_queue__list(Slave_Ports_Status_QUEUE_A,Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A) ;
|
|
|
- #endif
|
|
|
- /* int _Slave_Ports_queue_count = _Slave_Ports_queue.count();
|
|
|
- int _Slave_Ports_queue_front = _Slave_Ports_queue.front();
|
|
|
- int _Slave_Ports_queue_back = _Slave_Ports_queue.back();
|
|
|
- int _Slave_Ports_queue_peek = _Slave_Ports_queue.peek();
|
|
|
- int _Slave_Ports_queue_pop = _Slave_Ports_queue.pop();
|
|
|
- */
|
|
|
- #if defined(DISABLE_LOOP) || defined(DEBUG)
|
|
|
- if(DEBUG_ACTION_TRIG != DEBUG_LAST_ACTION_TRIG) {
|
|
|
- Serial.print("#14 main_loop_end ");
|
|
|
- //Serial.print(_Slave_Ports_queue_count);
|
|
|
- Serial.println("] ");
|
|
|
- }
|
|
|
- #endif
|
|
|
-
|
|
|
-
|
|
|
- #endif
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- ///BEGIN
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- #if defined(DEBUG)
|
|
|
- #ifndef DISABLE_LOOP
|
|
|
- if(DEBUG_ACTION_TRIG == 1) Serial.print("] Time: " ); Serial.println(time);
|
|
|
-
|
|
|
- #endif
|
|
|
- #endif
|
|
|
- if(DEBUG_ACTION_TRIG == 1 or (time % 100000 == 0)) {
|
|
|
- #if defined(DEBUG_ACTION_TRIG_ENABLE)
|
|
|
- Serial.print("Time: " ); Serial.println(time);
|
|
|
- #endif
|
|
|
- }
|
|
|
- #ifndef DISABLE_LOOP
|
|
|
- if(DEBUG_ACTION_TRIG == 1) {
|
|
|
- #if defined(DEBUG)
|
|
|
- Serial.print("#331_L1 main loop top ARDUINO_FUNCT_INIT_RESULT__Slave_Ports_LOCAL_init ");
|
|
|
- Serial.println(ARDUINO_FUNCT_INIT_RESULT__Slave_Ports_LOCAL_init);
|
|
|
- Serial.print("#331_L2 main loop top ARDUINO_FUNCT_INIT_RESULT__Slave_Ports_LOCAL_init=[");
|
|
|
- Serial.println(ARDUINO_FUNCT_INIT_RESULT__Slave_Ports_LOCAL_init);
|
|
|
- Serial.print(" true["); Serial.print(true); Serial.print("] false["); Serial.print(false);
|
|
|
- Serial.println("] ");
|
|
|
- #endif
|
|
|
- }
|
|
|
-
|
|
|
- #if defined(DEBUG_DISPLAY)
|
|
|
-
|
|
|
- Serial.print("#532 Will TODO bug when too many mesgs to queue ..DISPLAY_pos_seq_T[");
|
|
|
- Serial.print(DISPLAY_pos_seq_A_NEXT , BIN); Serial.print("]+[ "); Serial.print(DISPLAY_pos_seq_A_IMMEDIATE , BIN); Serial.print("] ==[ "); Serial.print(DISPLAY_pos_seq_A_NEXT | DISPLAY_pos_seq_A_IMMEDIATE , BIN);
|
|
|
- Serial.print("] DISPLAY_TARGET_T 128["); Serial.print(DISPLAY_TARGET_DISPLAY128, BIN);Serial.print("] bin[");
|
|
|
- Serial.println("] ");
|
|
|
- #endif
|
|
|
-
|
|
|
- Slave_Ports_Status__DISPLAY_TARGET(
|
|
|
- Slave_Ports_Status_A ,
|
|
|
- Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A,
|
|
|
- 0 ,
|
|
|
- DISPLAY_A ,
|
|
|
- DISPLAY_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- DISPLAY_PHYSICAL_CHAR_A,
|
|
|
- DISPLAY_pos_seq_A_NEXT | DISPLAY_pos_seq_A_IMMEDIATE ,
|
|
|
- "PORTS [" ,
|
|
|
- DISPLAY_TARGET_DISPLAY128,
|
|
|
- time,
|
|
|
- time + ARDUINO_time_seq_id_A_INCREMENT //ARDUINO_LOOP_LATENCY_DISPLAY_MENU
|
|
|
- //queue
|
|
|
- ,Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- TASK_TYPE_T__EMPTY__JUST_PASSED_ARG__,
|
|
|
- TASK_PORT_ASSOC_EMPTY
|
|
|
- //,DISPLAY_PHYSICAL_CHAR_A
|
|
|
- );
|
|
|
-
|
|
|
-
|
|
|
- #if defined(HAS_TFT_ILI9163C)
|
|
|
-
|
|
|
- DISPLAY__print_menu( DISPLAY_A ,DISPLAY_T_ARDUINO_ATTR_ARRAY_A , DISPLAY_PHYSICAL_CHAR_A,
|
|
|
- 1, //DISPLAY_MENU_ITEM_INDEX_T DISPLAY_MENU_ITEM_INDEX_A
|
|
|
- time,time + ARDUINO_LOOP_LATENCY_DISPLAY_MENU//time_seq_id_A, (time_seq_id_A + 5000)
|
|
|
- ,Slave_Ports_Status_A
|
|
|
- );
|
|
|
-
|
|
|
- if(DISPLAY_DEBUG_LATENCY_PASS__POP(time,time + ARDUINO_LOOP_LATENCY_DISPLAY_MENU )) {
|
|
|
- //debug analpir
|
|
|
- DISPLAY_DEV.fillRect( 0, ( DISPLAY_CURSOR_Y_CHARS_DEBUG * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A ) , DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_PX_A , DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A , RED );
|
|
|
- DISPLAY_DEV.setCursor(0 , DISPLAY_CURSOR_Y_CHARS_DEBUG * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A );
|
|
|
-
|
|
|
-
|
|
|
- DISPLAY_DEV.print("P:"); DISPLAY_DEV.print(Port11); DISPLAY_DEV.print(" "); DISPLAY_DEV.print(digitalRead(Port11)); //DISPLAY_DEV.print(analogRead(Port11));
|
|
|
- #if defined(PROGMEM_CONSOLE_WRITE)
|
|
|
- LCD_print_DISPLAY_MENU_A(DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT);
|
|
|
- #endif
|
|
|
- }
|
|
|
- #endif
|
|
|
-
|
|
|
- #else
|
|
|
-
|
|
|
- #include "___DEBUG/___DEBUG_DISABLE_LOOP_MAIN_A.h"
|
|
|
- #endif
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
- ///EOF
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /*
|
|
|
-if(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A <= ARDUINO_LOOP_LATENCY_COUNTER_INIT ) {
|
|
|
- #ifndef DISABLE_LOOP
|
|
|
- if(DEBUG_ACTION_TRIG != DEBUG_LAST_ACTION_TRIG) {
|
|
|
- Serial.print("#39 ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A"); Serial.print(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A); Serial.println("] ");
|
|
|
- }
|
|
|
- #endif
|
|
|
- ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A = ARDUINO_LOOP_LATENCY__MAIN_END_A ;
|
|
|
-
|
|
|
-} else {
|
|
|
- ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A ++ ;
|
|
|
-}
|
|
|
-*/
|
|
|
- //_LCD_print_buffors_list(_LCD_print_buffors) ;
|
|
|
- //_LCD_print_screens_list(_LCD_print_screens);
|
|
|
-
|