|
@@ -96,11 +96,11 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
void _Slave_Ports_queue__POP(
|
|
void _Slave_Ports_queue__POP(
|
|
|
Slave_Ports_Status_QUEUE_T* Slave_Ports_Status_QUEUE_A,
|
|
Slave_Ports_Status_QUEUE_T* Slave_Ports_Status_QUEUE_A,
|
|
|
Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- int _Slave_Ports_queue_count,
|
|
|
|
|
|
|
+ /* int _Slave_Ports_queue_count,
|
|
|
int _Slave_Ports_queue_pop,
|
|
int _Slave_Ports_queue_pop,
|
|
|
- int _Slave_Ports_queue_front,
|
|
|
|
|
- int _Slave_Ports_queue_back,
|
|
|
|
|
- int _Slave_Ports_queue_peek,
|
|
|
|
|
|
|
+ int Slave_Ports_ATTR_QUEUE_FRONT_A,
|
|
|
|
|
+ int Slave_Ports_ATTR_QUEUE_BACK_A,
|
|
|
|
|
+ int Slave_Ports_ATTR_QUEUE_PEEK_A,*/
|
|
|
int LCDtim,
|
|
int LCDtim,
|
|
|
Slave_Ports_Status_T* Slave_Ports_Status_A ,
|
|
Slave_Ports_Status_T* Slave_Ports_Status_A ,
|
|
|
Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
@@ -113,12 +113,52 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A,
|
|
DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A,
|
|
|
Adafruit_PWMServoDriver_T* Adafruit_PWMServoDriver_A
|
|
Adafruit_PWMServoDriver_T* Adafruit_PWMServoDriver_A
|
|
|
) {
|
|
) {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+//DO OBSLUGI KOLEJEK
|
|
|
|
|
+
|
|
|
|
|
+ ARDUINO_ARRAY_INDEX_CURRENT_T Slave_Ports_Status_QUEUE_T_INDEX_CURRENT_A = Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_INDEX_CURRENT_A ;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ARDUINO_ARRAY_ATTR_T Slave_Ports_ATTR_QUEUE_COUNT_MAX_A ;
|
|
|
|
|
+ARDUINO_ARRAY_ATTR_T Slave_Ports_ATTR_QUEUE_COUNT_A = Slave_Ports_Status_QUEUE_T_INDEX_CURRENT_A = Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_COUNT_A ;
|
|
|
|
|
+ARDUINO_ARRAY_ATTR_T Slave_Ports_ATTR_QUEUE_BACK_A ;
|
|
|
|
|
+ARDUINO_ARRAY_ATTR_T Slave_Ports_ATTR_QUEUE_FRONT_A ;
|
|
|
|
|
+ARDUINO_ARRAY_ATTR_T Slave_Ports_ATTR_QUEUE_PEEK_A = Slave_Ports_Status_QUEUE_T_INDEX_CURRENT_A ;
|
|
|
|
|
+
|
|
|
|
|
+Slave_Ports_Status_QUEUE_STATIC_ID_COUNTER( Slave_Ports_ATTR_QUEUE_COUNT_MAX_A,
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_COUNT_A, Slave_Ports_ATTR_QUEUE_PEEK_A,
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_BACK_A , Slave_Ports_ATTR_QUEUE_FRONT_A,
|
|
|
|
|
+ ARDUINO_ARRAY_ATTR_QUEUE_ACTION_SET
|
|
|
|
|
+
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//int count = _Slave_Ports_queuev.count();
|
|
//int count = _Slave_Ports_queuev.count();
|
|
|
//int _Slave_Ports_queue_pop _Slave_Ports_queuev.pop();
|
|
//int _Slave_Ports_queue_pop _Slave_Ports_queuev.pop();
|
|
|
- Serial.print("#180 run _Slave_Ports_queue__POP cnt "); Serial.print(_Slave_Ports_queue_count); Serial.print(" , pop: "); Serial.println(_Slave_Ports_queue_pop);
|
|
|
|
|
- _Slave_Ports_queue_task_type_DESC(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A) ;
|
|
|
|
|
|
|
+ //Serial.print("#180 run _Slave_Ports_queue__POP cnt ");
|
|
|
|
|
+ //Serial.print(_Slave_Ports_queue_count); Serial.print(" , pop: "); Serial.println(_Slave_Ports_queue_pop);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ Serial.print("[#120] _Slave_Ports_queue__POP COUNT_A[");
|
|
|
|
|
+ Serial.print(Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_COUNT_A);
|
|
|
|
|
+ Serial.print(" Slave_Ports_ATTR_QUEUE_COUNT_T["); Serial.print(Slave_Ports_ATTR_QUEUE_COUNT_A);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //Serial.print([ ARDUINO_ARRAY_COUNT_A]);
|
|
|
|
|
+ _Slave_Ports_queue_task_type_DESC(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A) ;
|
|
|
|
|
|
|
|
- if (_Slave_Ports_queue_count > 0) {
|
|
|
|
|
|
|
+ // if (_Slave_Ports_queue_count > 0) {
|
|
|
|
|
+ if(Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_COUNT_A > 0) {
|
|
|
/*
|
|
/*
|
|
|
String LCDarray1 = "`Slave_Ports_queue size [";
|
|
String LCDarray1 = "`Slave_Ports_queue size [";
|
|
|
LCDarray1.concat(_Slave_Ports_queue_count);
|
|
LCDarray1.concat(_Slave_Ports_queue_count);
|
|
@@ -126,32 +166,38 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
LCDarray1.concat(_Slave_Ports_queue_pop);
|
|
LCDarray1.concat(_Slave_Ports_queue_pop);
|
|
|
|
|
|
|
|
LCDarray1.concat("] Curr[");
|
|
LCDarray1.concat("] Curr[");
|
|
|
- LCDarray1.concat(_Slave_Ports_queue_front);
|
|
|
|
|
|
|
+ LCDarray1.concat(Slave_Ports_ATTR_QUEUE_FRONT_A);
|
|
|
|
|
|
|
|
String LCDarray2 = "] last[";
|
|
String LCDarray2 = "] last[";
|
|
|
- LCDarray2.concat(_Slave_Ports_queue_back);
|
|
|
|
|
|
|
+ LCDarray2.concat(Slave_Ports_ATTR_QUEUE_BACK_A);
|
|
|
LCDarray2.concat("] Next[");
|
|
LCDarray2.concat("] Next[");
|
|
|
- LCDarray2.concat(_Slave_Ports_queue_peek);
|
|
|
|
|
|
|
+ LCDarray2.concat(Slave_Ports_ATTR_QUEUE_PEEK_A);
|
|
|
Serial.print(LCDarray1);
|
|
Serial.print(LCDarray1);
|
|
|
Serial.println(LCDarray2);
|
|
Serial.println(LCDarray2);
|
|
|
*/
|
|
*/
|
|
|
- #if defined(DEBUG)
|
|
|
|
|
|
|
+ /* #if defined(DEBUG)
|
|
|
Serial.print("#166 _queue__POP [DEBUG] INF size["); Serial.print(_Slave_Ports_queue_count);
|
|
Serial.print("#166 _queue__POP [DEBUG] INF size["); Serial.print(_Slave_Ports_queue_count);
|
|
|
Serial.print("] pop["); Serial.print(_Slave_Ports_queue_pop);
|
|
Serial.print("] pop["); Serial.print(_Slave_Ports_queue_pop);
|
|
|
- Serial.print("] front["); Serial.print(_Slave_Ports_queue_front);
|
|
|
|
|
- Serial.print("] back["); Serial.print(_Slave_Ports_queue_back);
|
|
|
|
|
- Serial.print("] peek["); Serial.print(_Slave_Ports_queue_peek);
|
|
|
|
|
|
|
+ Serial.print("] front["); Serial.print(Slave_Ports_ATTR_QUEUE_FRONT_A);
|
|
|
|
|
+ Serial.print("] back["); Serial.print(Slave_Ports_ATTR_QUEUE_BACK_A);
|
|
|
|
|
+ Serial.print("] peek["); Serial.print(Slave_Ports_ATTR_QUEUE_PEEK_A);
|
|
|
Serial.println("] ");
|
|
Serial.println("] ");
|
|
|
#endif
|
|
#endif
|
|
|
-
|
|
|
|
|
|
|
+ */
|
|
|
// LCD_print(LCDarray1, LCDarray2, LCDtim / 3 ) ;
|
|
// LCD_print(LCDarray1, LCDarray2, LCDtim / 3 ) ;
|
|
|
|
|
|
|
|
- if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].QUEUE_ID_A == 0 and
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].QUEUE_ID_A == 0 and
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A == 0 and
|
|
|
|
|
|
|
+ // if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].QUEUE_ID_A == 0 and
|
|
|
|
|
+ if(Slave_Ports_Status_QUEUE_A[ Slave_Ports_ATTR_QUEUE_PEEK_A ].QUEUE_ID_A == 0 and
|
|
|
|
|
+ //Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].QUEUE_ID_A == 0 and
|
|
|
|
|
+ // Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A == 0 and
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[ Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A == 0 and
|
|
|
//Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_PORT_ASSOC_A == 0 and
|
|
//Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_PORT_ASSOC_A == 0 and
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_seq_id == 0 and
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_min_run == 0 ) {
|
|
|
|
|
|
|
+ // Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_seq_id == 0 and
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[ Slave_Ports_ATTR_QUEUE_PEEK_A ].time_seq_id == 0 and
|
|
|
|
|
+ // Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_min_run == 0 ) {
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[ Slave_Ports_ATTR_QUEUE_PEEK_A ].time_min_run == 0 ) {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/* todo
|
|
/* todo
|
|
|
String LCDarray1 = "#206 Error with queue";
|
|
String LCDarray1 = "#206 Error with queue";
|
|
|
String LCDarray2 = "ID: ";
|
|
String LCDarray2 = "ID: ";
|
|
@@ -162,7 +208,7 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
*/
|
|
*/
|
|
|
#if defined(DEBUG)
|
|
#if defined(DEBUG)
|
|
|
// if(DEBUG > 6) {
|
|
// if(DEBUG > 6) {
|
|
|
- Serial.print("#166 _queue__POP [DEBUG] Error with queue [_Slave_Ports_queue_pop"); Serial.print(_Slave_Ports_queue_pop);
|
|
|
|
|
|
|
+ Serial.print("#166 [DEBUG] Error with queue [INDEX_CURR]=["); Serial.print(Slave_Ports_ATTR_QUEUE_PEEK_A);
|
|
|
Serial.println("] ");
|
|
Serial.println("] ");
|
|
|
// }
|
|
// }
|
|
|
#endif
|
|
#endif
|
|
@@ -178,39 +224,43 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
Serial.println(LCDarray2);
|
|
Serial.println(LCDarray2);
|
|
|
// LCD_print(LCDarray1, LCDarray2, LCDtim / 3 ) ;
|
|
// LCD_print(LCDarray1, LCDarray2, LCDtim / 3 ) ;
|
|
|
*/
|
|
*/
|
|
|
- if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_min_run > millis()) {
|
|
|
|
|
- Serial.print("#182 QUEUE reassign .time_seq_id > millis() time_seq_id["); Serial.print( Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_seq_id);
|
|
|
|
|
|
|
+ if(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_min_run > millis()) {
|
|
|
|
|
+ Serial.print("#182 QUEUE reassign .time_seq_id > millis() time_seq_id["); Serial.print( Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_seq_id);
|
|
|
Serial.print("] millis()["); Serial.print(millis());
|
|
Serial.print("] millis()["); Serial.print(millis());
|
|
|
- Serial.print("] TASK_TYPE_A["); Serial.print(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A);
|
|
|
|
|
- Serial.print("] Will wait() to next ["); Serial.print(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_seq_id);
|
|
|
|
|
- Serial.print("] POP/ID ["); Serial.print(_Slave_Ports_queue_pop); Serial.println("] ");
|
|
|
|
|
|
|
+ Serial.print("] TASK_TYPE_A["); Serial.print(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A);
|
|
|
|
|
+ Serial.print("] Will wait() to next ["); Serial.print(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_seq_id);
|
|
|
|
|
+ Serial.print("] #["); Serial.print(Slave_Ports_ATTR_QUEUE_PEEK_A); Serial.print("] ID["); Serial.print(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].QUEUE_ID_A); Serial.println("] ");
|
|
|
_Slave_Ports_queue__add( Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
_Slave_Ports_queue__add( Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_PORT_ASSOC_A,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_seq_id,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_min_run,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_PORT_ASSOC_A,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_seq_id,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_min_run,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A
|
|
|
);
|
|
);
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop]={} ;
|
|
|
|
|
|
|
+ Serial.print("[WILL DELETE REC] millis()["); Serial.print(millis());
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A]={} ;
|
|
|
|
|
|
|
|
- } else if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A == TASK_TYPE_T_Slave_Ports_ttl_decrement) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //TODO CALL STORAGE ROUND ROBIN
|
|
|
|
|
+
|
|
|
|
|
+ } else if(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A == TASK_TYPE_T_Slave_Ports_ttl_decrement) {
|
|
|
|
|
|
|
|
- Serial.print("#224 running _Slave_Ports_ttl_decrement = "); Serial.println( Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A); Serial.println("]");
|
|
|
|
|
|
|
+ Serial.print("#224 running _Slave_Ports_ttl_decrement = "); Serial.println( Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A); Serial.println("]");
|
|
|
//#include "_Slave_Ports_ttl_decrement.h"
|
|
//#include "_Slave_Ports_ttl_decrement.h"
|
|
|
- _Slave_Ports_ttl_decrement_POP(Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A, _Slave_Ports_queue_pop , Slave_Ports_Status_A ) ;
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop]={} ;
|
|
|
|
|
-
|
|
|
|
|
- } else if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A == TASK_TYPE_T_Slave_Ports_broadcast____) {
|
|
|
|
|
- Serial.print("#337 running _Slave_Ports_broadcast = "); Serial.println( Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A); Serial.println("]");
|
|
|
|
|
|
|
+ _Slave_Ports_ttl_decrement_POP(Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A, Slave_Ports_ATTR_QUEUE_PEEK_A , Slave_Ports_Status_A ) ;
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A]={} ;
|
|
|
|
|
+ //TODO STORAGE
|
|
|
|
|
+ } else if(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A == TASK_TYPE_T_Slave_Ports_broadcast____) {
|
|
|
|
|
+ Serial.print("#337 running _Slave_Ports_broadcast = "); Serial.println( Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A); Serial.println("]");
|
|
|
// #include "_Slave_Ports_ttl_decrement.h"
|
|
// #include "_Slave_Ports_ttl_decrement.h"
|
|
|
_Slave_Ports_broadcast_POP(
|
|
_Slave_Ports_broadcast_POP(
|
|
|
Slave_Ports_Status_QUEUE_A,
|
|
Slave_Ports_Status_QUEUE_A,
|
|
|
Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- _Slave_Ports_queue_count,
|
|
|
|
|
- _Slave_Ports_queue_pop,
|
|
|
|
|
- _Slave_Ports_queue_front,
|
|
|
|
|
- _Slave_Ports_queue_back,
|
|
|
|
|
- _Slave_Ports_queue_peek,
|
|
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_COUNT_A,
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_PEEK_A,
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_FRONT_A,
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_BACK_A,
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_PEEK_A,
|
|
|
LCDtim,
|
|
LCDtim,
|
|
|
Slave_Ports_Status_A ,
|
|
Slave_Ports_Status_A ,
|
|
|
Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
@@ -230,11 +280,11 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
DISPLAY_PHYSICAL_CHAR_A
|
|
DISPLAY_PHYSICAL_CHAR_A
|
|
|
*/
|
|
*/
|
|
|
) ;
|
|
) ;
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop]={} ;
|
|
|
|
|
- } else if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A == TASK_TYPE_T_DISPLAY_queue_pop________ ) {
|
|
|
|
|
- Serial.print("#212 DISPLAY TASK_TYPE_A["); Serial.print( Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A);
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A]={} ; //todo storage
|
|
|
|
|
+ } else if(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A == TASK_TYPE_T_DISPLAY_queue_pop________ ) {
|
|
|
|
|
+ Serial.print("#212 DISPLAY TASK_TYPE_A["); Serial.print( Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A);
|
|
|
Serial.println("] ");
|
|
Serial.println("] ");
|
|
|
- _Slave_Ports_queue_task_type_DESC(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A) ;
|
|
|
|
|
|
|
+ _Slave_Ports_queue_task_type_DESC(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
// #include "_DISPLAY_queue_pop_func.h"
|
|
// #include "_DISPLAY_queue_pop_func.h"
|
|
@@ -242,27 +292,27 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
DISPLAY__print( DISPLAY_A ,
|
|
DISPLAY__print( DISPLAY_A ,
|
|
|
DISPLAY_T_ARDUINO_ATTR_ARRAY_A ,
|
|
DISPLAY_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
DISPLAY_PHYSICAL_CHAR_A,
|
|
DISPLAY_PHYSICAL_CHAR_A,
|
|
|
- DISPLAY_A[Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A].DISPLAY_pos_seq_A,
|
|
|
|
|
- DISPLAY_A[Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A].DISPLAY_array16_A,
|
|
|
|
|
- DISPLAY_A[Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A].DISPLAY_TARGET_A,
|
|
|
|
|
- DISPLAY_A[Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A].time_seq_id_A,
|
|
|
|
|
- DISPLAY_A[Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A].time_min_run_A,
|
|
|
|
|
|
|
+ DISPLAY_A[Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A].DISPLAY_pos_seq_A,
|
|
|
|
|
+ DISPLAY_A[Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A].DISPLAY_array16_A,
|
|
|
|
|
+ DISPLAY_A[Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A].DISPLAY_TARGET_A,
|
|
|
|
|
+ DISPLAY_A[Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A].time_seq_id_A,
|
|
|
|
|
+ DISPLAY_A[Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A].time_min_run_A,
|
|
|
//queue
|
|
//queue
|
|
|
Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_PORT_ASSOC_A);
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_PORT_ASSOC_A);
|
|
|
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop]={} ;
|
|
|
|
|
- Serial.print("#201 DELETED DISPLAY TASK_TYPE_A #["); Serial.print( _Slave_Ports_queue_pop);
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A]={} ; //todo storage
|
|
|
|
|
+ Serial.print("#201 DELETED DISPLAY TASK_TYPE_A #["); Serial.print( Slave_Ports_ATTR_QUEUE_PEEK_A);
|
|
|
|
|
|
|
|
|
|
|
|
|
- } else if(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A == TASK_TYPE_T_Slave_Ports_set_I2C______) {
|
|
|
|
|
- Serial.print("#221 running TASK_TYPE_T_Slave_Ports_set_I2C______ = "); Serial.println( Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A); Serial.println("]");
|
|
|
|
|
|
|
+ } else if(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A == TASK_TYPE_T_Slave_Ports_set_I2C______) {
|
|
|
|
|
+ Serial.print("#221 running TASK_TYPE_T_Slave_Ports_set_I2C______ = "); Serial.println( Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A); Serial.println("]");
|
|
|
//#include "_Slave_Ports_ttl_decrement.h"
|
|
//#include "_Slave_Ports_ttl_decrement.h"
|
|
|
_Slave_Ports_I2C_POP(
|
|
_Slave_Ports_I2C_POP(
|
|
|
//Slave_Ports_Status_QUEUE_A, _Slave_Ports_queue_pop , Slave_Ports_Status_A
|
|
//Slave_Ports_Status_QUEUE_A, _Slave_Ports_queue_pop , Slave_Ports_Status_A
|
|
|
Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- _Slave_Ports_queue_pop ,
|
|
|
|
|
|
|
+ Slave_Ports_ATTR_QUEUE_PEEK_A ,
|
|
|
Slave_Ports_Status_A,
|
|
Slave_Ports_Status_A,
|
|
|
Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
//display
|
|
//display
|
|
@@ -272,27 +322,28 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
DISPLAY_pos_seq_A_NEXT, //initial set
|
|
DISPLAY_pos_seq_A_NEXT, //initial set
|
|
|
"#233 Setting I2C" , //DISPLAY_array16_A,
|
|
"#233 Setting I2C" , //DISPLAY_array16_A,
|
|
|
DISPLAY_TARGET_ANY , //DISPLAY_TARGET_A, - setting
|
|
DISPLAY_TARGET_ANY , //DISPLAY_TARGET_A, - setting
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_seq_id,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].time_min_run,
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_seq_id,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].time_min_run,
|
|
|
//tasks
|
|
//tasks
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_PORT_ASSOC_A,
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_PORT_ASSOC_A,
|
|
|
Adafruit_PWMServoDriver_A
|
|
Adafruit_PWMServoDriver_A
|
|
|
) ;
|
|
) ;
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop]={} ;
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A]={} ; //todo storage
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
|
- Serial.print("$177 Error unsupported type TASK_TYPE_A["); Serial.print( Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A);
|
|
|
|
|
- _Slave_Ports_queue_task_type_DESC(Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A) ;
|
|
|
|
|
|
|
+ Serial.print("$177 Error unsupported type TASK_TYPE_A["); Serial.print( Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A);
|
|
|
|
|
+ _Slave_Ports_queue_task_type_DESC(Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A) ;
|
|
|
Serial.println("] REASSIGN NEXT QUEUE FOR FURTHER ACTION");
|
|
Serial.println("] REASSIGN NEXT QUEUE FOR FURTHER ACTION");
|
|
|
_Slave_Ports_queue__add( Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
_Slave_Ports_queue__add( Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_TYPE_A,
|
|
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].TASK_PORT_ASSOC_A,
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_TYPE_A,
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].TASK_PORT_ASSOC_A,
|
|
|
millis(),
|
|
millis(),
|
|
|
millis() + ARDUINO_time_seq_id_A_INCREMENT ,
|
|
millis() + ARDUINO_time_seq_id_A_INCREMENT ,
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop].DISPLAY_ARDUINO_ARRAY_INDEX_A
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A].DISPLAY_ARDUINO_ARRAY_INDEX_A
|
|
|
);
|
|
);
|
|
|
- Slave_Ports_Status_QUEUE_A[_Slave_Ports_queue_pop]={} ;
|
|
|
|
|
|
|
+ Slave_Ports_Status_QUEUE_A[Slave_Ports_ATTR_QUEUE_PEEK_A]={} ;
|
|
|
|
|
+ //TODO STORAGE
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -327,11 +378,11 @@ Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_QUEUE_T_ARDU
|
|
|
Serial.print(" #364 scount ");
|
|
Serial.print(" #364 scount ");
|
|
|
Serial.print(_Slave_Ports_queue_count);
|
|
Serial.print(_Slave_Ports_queue_count);
|
|
|
Serial.print(" _Slave_Ports_queue.front(): ");
|
|
Serial.print(" _Slave_Ports_queue.front(): ");
|
|
|
- Serial.print(_Slave_Ports_queue_front);
|
|
|
|
|
|
|
+ Serial.print(Slave_Ports_ATTR_QUEUE_FRONT_A);
|
|
|
Serial.print(" _Slave_Ports_queue.back(): ");
|
|
Serial.print(" _Slave_Ports_queue.back(): ");
|
|
|
- Serial.print(_Slave_Ports_queue_back);
|
|
|
|
|
|
|
+ Serial.print(Slave_Ports_ATTR_QUEUE_BACK_A);
|
|
|
Serial.print(" _Slave_Ports_queue.peek(): ");
|
|
Serial.print(" _Slave_Ports_queue.peek(): ");
|
|
|
- Serial.println(_Slave_Ports_queue_peek);
|
|
|
|
|
|
|
+ Serial.println(Slave_Ports_ATTR_QUEUE_PEEK_A);
|
|
|
*/
|
|
*/
|
|
|
// LCD_print(LCDarray1, LCDarray2, LCDtim / 3 ) ;
|
|
// LCD_print(LCDarray1, LCDarray2, LCDtim / 3 ) ;
|
|
|
}
|
|
}
|