Explorar o código

testing new style referenced values ewlwmwntas

arkadiusz binder %!s(int64=5) %!d(string=hai) anos
pai
achega
9492d22106
Modificáronse 13 ficheiros con 350 adicións e 81 borrados
  1. 23 8
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/0x20/config.h
  2. 1 1
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/0x20/pins.h
  3. 1 2
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/config_defaults.h
  4. 2 0
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/pins.h
  5. 66 3
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__display.h
  6. 8 6
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__pins__setup.h
  7. 44 1
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__pwm.h
  8. 9 3
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__router.h
  9. 40 4
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__struct.h
  10. 15 0
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__swing.h
  11. 60 23
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__task.h
  12. 8 2
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__task__loop.h
  13. 73 28
      SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/testing_pwm_amp.ino

+ 23 - 8
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/0x20/config.h

@@ -11,14 +11,29 @@
 
 //todo appends
 
-//P5__TASK__CONFIG_A[1]. = { "PW" , P5__TASK__TYPE__ROOT };
-//P5__TASK__CONFIG_A[1].P5__TASK__CONFIG__NAME_A = "PW" ;
-//P5__TASK__CONFIG_A[1].P5__TASK__TYPE__CLASS_A = P5__TASK__TYPE__ROOT ;
 
-//p5__task__config__set(P5__TASK__CONFIG_A, 1,  {"P","W"} ,  P5__TASK__TYPE__ROOT ) ;
-
-
-void p5__config__individual__init(P5__TASK__CONFIG_T* P5__TASK__CONFIG_A) {
-   //p5__task__config__set(P5__TASK__CONFIG_A, 1,  "PW" ,  P5__TASK__TYPE__ROOT ) ;
+void p5__config__individual__init( 
+    //U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
+    //U8G2LOG u8g2log, 
+    P5__TASK__CONFIG_T* P5__TASK__CONFIG_A) {
+         Serial.print(" CC ");
+
+     
+     P5__ARRAY__INDEX_T P5__ARRAY__INDEX_A = 2;
+     P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A = P5__TASK__TYPE__ROOT;
+     P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX_A ;
+     P5__TASK__CONFIG__NAME__INDEX_A = P5__TASK__CONFIG__NAME__INDEX__PW ;
+    // P5__TASK__CONFIG__NAME__INDEX_A = P5__TASK__CONFIG__NAME__INDEX_A + P5__TASK__CONFIG__NAME__INDEX__SW
+     P5__TASK__TYPE__ASSOC_T P5__TASK__TYPE__ASSOC_A = 0;
+   p5__task__config__set( P5__TASK__CONFIG_A, P5__ARRAY__INDEX_A, P5__TASK__TYPE__CLASS_A ,P5__TASK__CONFIG__NAME__INDEX_A , P5__TASK__TYPE__ASSOC_A  ) ;
+     
+     
+      P5__ARRAY__INDEX_A = 3;
+      P5__TASK__TYPE__CLASS_A =  P5__TASK__TYPE__TYPE;
+      P5__TASK__CONFIG__NAME__INDEX_A = P5__TASK__CONFIG__NAME__INDEX__SW ;
+      P5__TASK__TYPE__ASSOC_A = 2;
+    p5__task__config__set( P5__TASK__CONFIG_A, P5__ARRAY__INDEX_A, P5__TASK__TYPE__CLASS_A ,P5__TASK__CONFIG__NAME__INDEX_A , P5__TASK__TYPE__ASSOC_A  ) ;
+
+     
 
 }

+ 1 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/0x20/pins.h

@@ -4,4 +4,4 @@
 #define P5__PWM__PIN__CONF  P5__PWM__PIN
 
 
-int test_pwm_pin = P5__PWM__PIN__CONF;
+//int test_pwm_pin = P5__PWM__PIN__CONF;

+ 1 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/config_defaults.h

@@ -14,5 +14,4 @@
     #define HAS_serial_115200
 #endif
 
-    
-#include "pins.h"
+   

+ 2 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___CONFIG/pins.h

@@ -0,0 +1,2 @@
+#define P5__PWM__PIN  9
+ #define P5__PWM__PIN__CONF  P5__PWM__PIN //todo depxw  

+ 66 - 3
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__display.h

@@ -80,8 +80,9 @@ void p5__display__print(
     U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
     U8G2LOG u8g2log, 
    /// p5__display__class p5__display__class_A,
-    //P5__ROUTER_STRING_T P5__ROUTER_STRING_A
-    char* P5__ROUTER_STRING_A) 
+    P5__ROUTER_STRING_T P5__ROUTER_STRING_A
+    //char* P5__ROUTER_STRING_A
+    ) 
     {
     
  //   p5__display__class p5__display__class_A;
@@ -94,4 +95,66 @@ void p5__display__print(
     */
      u8g2log.print(P5__ROUTER_STRING_A);
     
-    }
+    }
+    
+    
+
+void p5__display__log( 
+    U8G2LOG u8g2log, 
+    char PARAM_N[3],
+    char* PARAM_V,
+    bool NEW_LINE = 0
+    ) 
+    {
+    
+    #if defined(P5__DISPLAY__DISABLE)
+    #else
+    
+          u8g2log.print(PARAM_N);
+         u8g2log.print(" ![");
+         u8g2log.print(PARAM_V);
+           u8g2log.print("] ");
+           if( NEW_LINE == 1)   u8g2log.print("\n");
+     #endif   
+    
+    }
+    
+    
+    void p5__display__log__beg( 
+    U8G2LOG u8g2log
+    ) 
+    {
+     #if defined(P5__DISPLAY__DISABLE)
+     #else
+         u8g2log.print(" [");
+     #endif
+    
+    }
+    
+    void p5__display__log__part( 
+    U8G2LOG u8g2log, 
+    String PARAM_N
+    ) 
+    {
+         #if defined(P5__DISPLAY__DISABLE)
+             #else
+            u8g2log.print("   ");
+              u8g2log.print(PARAM_N);
+             u8g2log.print(" [");
+         #endif
+    }
+    
+    
+    
+void p5__display__log__last( 
+    U8G2LOG u8g2log, 
+    bool NEW_LINE = 0
+    ) 
+    {
+         #if defined(P5__DISPLAY__DISABLE)
+         #else
+             u8g2log.print("]");
+             if( NEW_LINE == 1)   u8g2log.print(" \n");
+         #endif
+    }
+    

+ 8 - 6
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__pins__setup.h

@@ -7,16 +7,16 @@
     
     //P5__STATUS_T
      void p5__pins__setup(
-     U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
-    U8G2LOG u8g2log, 
+   //  U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
+   // U8G2LOG u8g2log, 
       // p5__display__class p5__display__class_A,
      P5__STATUS_T &P5__STATUS_A
      
      ) {
         //P5__STATUS_T P5__STATUS_A ;
         #if defined(P5__PWM__PIN__CONF)
-               pinMode(P5__PWM__PIN__CONF, OUTPUT);  // sets the pin as output
-               analogWrite(P5__PWM__PIN__CONF, 100); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
+          //     pinMode(P5__PWM__PIN__CONF, OUTPUT);  // sets the pin as output
+          //     analogWrite(P5__PWM__PIN__CONF, 0); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
 
         #endif
         
@@ -24,8 +24,10 @@
         //return "PIN ST +";
       //  return 10;
                      //12345678
-       P5__STATUS_A = "PIN ST+";
-       p5__router__status__final__string(u8g2,u8g2log , P5__STATUS_A );
+     //X  P5__STATUS_A = "PIN ST+"; FAILED
+     //TODO X  p5__router__status__final__string(u8g2,u8g2log , P5__STATUS_A );
+              Serial.println(" PS ");
+       //  u8g2log.print(" PS ");
         
     }
 

+ 44 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__pwm.h

@@ -1,8 +1,51 @@
 #ifndef P5__PWM
 #define P5__PWM
 
-#define P5__PWM__PIN  9
+//#define P5__PWM__PIN  9
 //int test_pwm_pin = 9;
 
+//  const P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX__PW = B00000001 ; //pwm
+/*int P5__TASK__PW__ATTR(int P5__TASK__PW__ATTR_A, int P5__TASK__ATTR_ACCTION) {
+    static int P5__TASK__PW__ATTR_A_S = 0 ;
+    if(P5__TASK__ATTR_ACCTION == 0) { //reply notgubg
+    
+    } else  if(P5__TASK__ATTR_ACCTION == 1) { //reply  current
+        return P5__TASK__PW__ATTR_A_S;
+    }  else if(P5__TASK__ATTR_ACCTION == 2  )  { //set new init
+         P5__TASK__PW__ATTR_A_S = 100; //P5__TASK__PW__ATTR_A;
+         Serial.print(P5__TASK__PW__ATTR_A_S);
+         return P5__TASK__PW__ATTR_A_S;
+    } else if(P5__TASK__ATTR_ACCTION == 3)  { //set new
+         P5__TASK__PW__ATTR_A_S = P5__TASK__PW__ATTR_A;
+         return P5__TASK__PW__ATTR_A_S;
+    }
+
+}
+*/
+void P5__TASK__PW(
+    P5__TASK__CONFIG_T* P5__TASK__CONFIG_A,
+    P5__TASK__CONFIG__INDEX__CURRENT_T &P5__TASK__CONFIG__INDEX__CURRENT_A ,
+
+     P5__TASK__ATTR_T* P5__TASK__ATTR_A,
+     P5__TASK__ATTR__INDEX__CURRENT_T  &P5__TASK__ATTR__INDEX__CURRENT_A 
+      //  P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A,
+      //  P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX_A,
+      //  P5__TASK__TYPE__ASSOC_T P5__TASK__TYPE__ASSOC_A
+    ) {
+        //P5__TASK__CONFIG__NAME__ATTRIBUTE__STATUS__OUTPUT__LEVEL_A
+        /* analogWrite(P5__PWM__PIN__CONF, 
+            P5__TASK___ATTR (
+                P5__TASK__CONFIG_A,
+                P5__TASK__CONFIG__INDEX__CURRENT_A ,
+                P5__TASK__ATTR_A,
+                P5__TASK__ATTR__INDEX__CURRENT_A ,
+                    P5__TASK__TYPE__ATTRIBUTE_A ,
+                    P5__TASK__CONFIG__NAME__ATTRIBUTE__STATUS__OUTPUT__LEVEL_A
+                ) 
+           ); 
+           */
+         Serial.println("");Serial.print("PW");
+
+  }
 
 #endif

+ 9 - 3
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__router.h

@@ -4,12 +4,18 @@
 
  
     void p5__router__status__final__string(
-     U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
-    U8G2LOG u8g2log, 
+     //U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
+    //U8G2LOG u8g2log, 
     //p5__display__class p5__display__class_A,
     P5__ROUTER_STRING_T P5__ROUTER_STRING_A) {
         // #if defined(HAS_u8g2)
-        
+               // p5__display__log__part(u8g2log,"S+");
+         //F       u8g2log.print(" S+");
+         //F       p5__display__log__beg(u8g2log);
+         //D       String P5__ROUTER_STRING_A_S = String(P5__ROUTER_STRING_A);
+                
+           //D     u8g2log.print(P5__ROUTER_STRING_A_S);
+            //D    p5__display__log__last(u8g2log,0);
      //  p5__display__print( p5__display__class_A, P5__ROUTER_STRING_A);  // write something to the internal memory
          //u8g2.drawStr(4,29,"test123");
         // u8g2.sendBuffer();         // transfer internal memory to the display

+ 40 - 4
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__struct.h

@@ -24,19 +24,55 @@
   const P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__TYPE = 6;
   const P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__GROUP = 7;
 
+  const P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__ATTRIBUTE_A = 8;
+
  // typedef P5__TASK_T P5__TASK__CONFIG_T ;
-  typedef char P5__TASK__CONFIG__NAME_T[3] ; //nazwa elementu
+  //typedef char P5__TASK__CONFIG__NAME_T[3] ; //nazwa elementu
+  
+  typedef P5__ARRAY__INDEX_T P5__TASK__TYPE__ASSOC_T ; //do asscc
+  //typedef  P5__TASK__TYPE__ASSOC_T 
+  
+  
+  typedef int P5__TASK__CONFIG__NAME__INDEX_T ; //todo expand
+  const P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX__PW = 1 ; //pwm
+  const P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX__SW = 2 ; //swing
+  const P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__ATTRIBUTE__STATUS__OUTPUT__LEVEL_A = 3 ; //swing
+
   
   struct P5__TASK__CONFIG_S {
-    P5__TASK__CONFIG__NAME_T P5__TASK__CONFIG__NAME_A;
+  //  P5__TASK__CONFIG__NAME_T P5__TASK__CONFIG__NAME_A;
     P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A;
+    P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX_A;
+    P5__TASK__TYPE__ASSOC_T P5__TASK__TYPE__ASSOC_A; //id ref elem
   };
   
   typedef  P5__TASK__CONFIG_S P5__TASK__CONFIG_T;
   
-  const P5__LIMITS_T P5__TASK__CONFIG__LIMIT = 50;
-  
+  const P5__LIMITS_T P5__TASK__CONFIG__LIMIT = 20;
   
+   typedef P5__ARRAY__INDEX_T   P5__TASK__CONFIG__INDEX__CURRENT_T ;
+   static P5__TASK__CONFIG__INDEX__CURRENT_T  P5__TASK__CONFIG__INDEX__CURRENT_A = 2;
+ 
+ 
+ 
+  typedef int P5__TASK__ATTR_INT_T ;
+ // typedef P5__TASK__ATTR_INT_T  P5__TASK__ATTR_INT_STAT_T ;
+ 
+   struct P5__TASK__ATTR_S {
+     P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A;
+     P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX_A;
+     P5__TASK__TYPE__ASSOC_T P5__TASK__TYPE__ASSOC_A; //id ref elem
+     P5__TASK__ATTR_INT_T  P5__TASK__ATTR_INT_A ;//value
+   };
+   typedef P5__TASK__ATTR_S P5__TASK__ATTR_T;
+   
+     const P5__LIMITS_T P5__TASK__ATTR__LIMIT = 10;
+
+   static P5__TASK__ATTR_T P5__TASK__ATTR_A[P5__TASK__ATTR__LIMIT];
+    
+    typedef P5__ARRAY__INDEX_T   P5__TASK__ATTR__INDEX__CURRENT_T ;
+   static P5__TASK__ATTR__INDEX__CURRENT_T  P5__TASK__ATTR__INDEX__CURRENT_A = 2;
+
   //todo to init
  // P5__TASK__CONFIG_T P5__TASK__CONFIG_A;
   

+ 15 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__swing.h

@@ -1,4 +1,19 @@
 #ifndef P5__SWING
 #define P5__SWING
 
+
+//  const P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX__SW = B00000010 ; //swing
+
+
+
+void P5__TASK__SW(
+    P5__TASK__CONFIG_T* P5__TASK__CONFIG_A,
+        P5__ARRAY__INDEX_T P5__ARRAY__INDEX_A //,
+        //P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A,
+        //P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX_A,
+        //P5__TASK__TYPE__ASSOC_T P5__TASK__TYPE__ASSOC_A
+    ) {
+
+
+    }
 #endif

+ 60 - 23
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__task.h

@@ -16,18 +16,34 @@ void p5__task__config__init(P5__TASK__CONFIG_T* P5__TASK__CONFIG_A) {
 
 
 
-void p5__task__config__set(P5__TASK__CONFIG_T* P5__TASK__CONFIG_A,
+void p5__task__config__set(
+   // U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
+   // U8G2LOG u8g2log, 
+    P5__TASK__CONFIG_T* P5__TASK__CONFIG_A,
     P5__ARRAY__INDEX_T P5__ARRAY__INDEX_A ,
-     P5__TASK__CONFIG__NAME_T P5__TASK__CONFIG__NAME_A,
-     P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A
+   
+     P5__TASK__TYPE__CLASS_T P5__TASK__TYPE__CLASS_A,
+      P5__TASK__CONFIG__NAME__INDEX_T P5__TASK__CONFIG__NAME__INDEX_A ,// P5__TASK__CONFIG__NAME_T P5__TASK__CONFIG__NAME_A,
+     P5__TASK__TYPE__ASSOC_T P5__TASK__TYPE__ASSOC_A
      ) {
 
- P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__CONFIG__NAME_A[0] = P5__TASK__CONFIG__NAME_A[1];
- P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__CONFIG__NAME_A[1] = P5__TASK__CONFIG__NAME_A[2];
-// P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__CONFIG__NAME_A[1] = "W";
-
- P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__TYPE__CLASS_A =P5__TASK__TYPE__CLASS_A ;
-
+         Serial.println(" SS ");
+         if(P5__ARRAY__INDEX_A == 1) {
+          //todo err
+         } else {
+       
+         
+            // strcpy(  P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__CONFIG__NAME_A, P5__TASK__CONFIG__NAME_A );
+                Serial.println(" MC ");
+           
+      
+               P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__TYPE__CLASS_A =   P5__TASK__TYPE__CLASS_A;// P5__TASK__TYPE__CLASS_A ;
+               P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__CONFIG__NAME__INDEX_A =   P5__TASK__CONFIG__NAME__INDEX_A;// P5__TASK__TYPE__CLASS_A ;
+               P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__TYPE__ASSOC_A = P5__TASK__TYPE__ASSOC_A;// P5__TASK__TYPE__CLASS_A ;
+
+                   
+        
+        }
 }
 
 
@@ -36,26 +52,47 @@ void p5__task__config__set(P5__TASK__CONFIG_T* P5__TASK__CONFIG_A,
 
 
 
-void p5__task__loop__run(P5__TASK__CONFIG_T* P5__TASK__CONFIG_A
-    ,P5__ARRAY__INDEX_T P5__ARRAY__INDEX_A ,
-    U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
-    U8G2LOG u8g2log
-    //, p5__display__class p5__display__class_A
+void p5__task__loop__run(
+   // U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2,
+   //    U8G2LOG u8g2log,
+     P5__TASK__CONFIG_T* P5__TASK__CONFIG_A,
+     P5__TASK__CONFIG__INDEX__CURRENT_T &P5__TASK__CONFIG__INDEX__CURRENT_A ,
+     P5__TASK__ATTR_T* P5__TASK__ATTR_A, 
+     P5__TASK__ATTR__INDEX__CURRENT_T  &P5__TASK__ATTR__INDEX__CURRENT_A 
     ) {
-
+        
+         Serial.println("");
+                  Serial.print(" TR[");Serial.print(P5__TASK__CONFIG__INDEX__CURRENT_A );
+                        Serial.print("]");
+        delay(100);
+        
+        
        //for(P5__ARRAY__INDEX_T i = 1; i++ ; i<P5__TASK__CONFIG__LIMIT) {
        
        //}
        
-       if(P5__TASK__CONFIG_A[P5__ARRAY__INDEX_A].P5__TASK__CONFIG__NAME_A == "PW") {
-                   P5__STATUS_T P5__STATUS_A = "TSK PW>";
-                   p5__router__status__final__string( //p5__display__class_A,
-                   u8g2, u8g2log ,
-                    P5__STATUS_A );
-       } else {
+       if(P5__TASK__CONFIG__INDEX__CURRENT_A  == 1) {
+            //ERROR todo
+       }   else  if(P5__TASK__CONFIG_A[P5__TASK__CONFIG__INDEX__CURRENT_A ].P5__TASK__CONFIG__NAME__INDEX_A == P5__TASK__CONFIG__NAME__INDEX__PW  ) {
+                Serial.print("_PW>");
+                P5__TASK__PW(P5__TASK__CONFIG_A,  P5__TASK__CONFIG__INDEX__CURRENT_A , P5__TASK__ATTR_A, P5__TASK__ATTR__INDEX__CURRENT_A );
+       }  else  if(P5__TASK__CONFIG_A[P5__TASK__CONFIG__INDEX__CURRENT_A ].P5__TASK__CONFIG__NAME__INDEX_A == P5__TASK__CONFIG__NAME__INDEX__SW) {
+            Serial.print("_SW>");
+       
+      }  else {
                    P5__STATUS_T P5__STATUS_A = "TSK ?";
-                   P5__STATUS_A.concat(String(P5__ARRAY__INDEX_A ));
-                   p5__router__status__final__string( u8g2, u8g2log, P5__STATUS_A );
+                   Serial.print(" TE ");
+                    Serial.print(P5__TASK__CONFIG__INDEX__CURRENT_A );
+                    Serial.print("C=");
+                     
+                      Serial.print(P5__TASK__CONFIG_A[P5__TASK__CONFIG__INDEX__CURRENT_A ].P5__TASK__TYPE__CLASS_A);
+                      Serial.print(" N =");
+                      Serial.print(String(P5__TASK__CONFIG_A[P5__TASK__CONFIG__INDEX__CURRENT_A ].P5__TASK__CONFIG__NAME__INDEX_A));
+                    
+                 //  P5__STATUS_A.concat(String(P5__ARRAY__INDEX_A ));
+                //   p5__router__status__final__string( u8g2, u8g2log, P5__STATUS_A );
        
        }
+        
 }
+

+ 8 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/___P5_LIB/p5__task__loop.h

@@ -1,2 +1,8 @@
-
-//p5__task__loop__run(P5__TASK__CONFIG_A , 1, u8g2) ; //todo ind next
+   delay(100);
+    p5__task__loop__run(
+    //u8g2,u8g2log,
+    P5__TASK__CONFIG_A , P5__TASK__CONFIG__INDEX__CURRENT_A , P5__TASK__ATTR_A, P5__TASK__ATTR__INDEX__CURRENT_A ) ; //todo ind next
+    P5__TASK__CONFIG__INDEX__CURRENT_A ++ ;
+    if( P5__TASK__CONFIG__INDEX__CURRENT_A > P5__TASK__CONFIG__LIMIT) {
+         P5__TASK__CONFIG__INDEX__CURRENT_A = 2;
+    }

+ 73 - 28
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp/testing_pwm_amp.ino

@@ -1,3 +1,10 @@
+
+#include <Arduino.h>
+#include <U8g2lib.h>
+
+#define P5__DISPLAY__DISABLE
+#define P5__DEBUG 
+
 #define Active_ControllerID 0x20
 
 //#include <StandardCplusplus.h>
@@ -8,13 +15,15 @@
 #include "___P5_LIB/p5__display.h"
 
 #include "___P5_LIB/p5__router.h"
+#include "___CONFIG/pins.h"
+  #include "___P5_LIB/p5__pins__setup.h"
 
-
+#include "___P5_LIB/p5__task___attr.h"
 
 #include "___P5_LIB/p5__intro.h"
 #include "___P5_LIB/p5__pwm.h"
 #include "___P5_LIB/p5__swing.h"
-#include "___P5_LIB/p5__pins__setup.h"
+//#include "___P5_LIB/p5__pins__setup.h"
 
 
 #include "___P5_LIB/p5__task.h"
@@ -42,14 +51,16 @@ U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0);
 //char *text ;
 //const char *text = "U8g2 ";
 //AA U8G2LOG u8g2log;
+U8G2LOG u8g2log;
 
-#define  U8LOG_WIDTH_D 32
-uint8_t U8LOG_WIDTH = U8LOG_WIDTH_D ;
+#define  U8LOG_WIDTH 32 // 15 //32
+//uint8_t U8LOG_WIDTH = U8LOG_WIDTH_D ;
+
+#define U8LOG_HEIGHT  10  // 4 //10 
+//uint8_t U8LOG_HEIGHT = U8LOG_HEIGHT_D ;
+//uint8_t u8log_buffer[U8LOG_WIDTH_D*U8LOG_HEIGHT_D];
+uint8_t u8log_buffer[U8LOG_WIDTH*U8LOG_HEIGHT];
 
-#define U8LOG_HEIGHT_D 5 //10 
-uint8_t U8LOG_HEIGHT = U8LOG_HEIGHT_D ;
-uint8_t u8log_buffer[U8LOG_WIDTH_D*U8LOG_HEIGHT_D];
-U8G2LOG u8g2log;
 
 //p5__display__class p5__display__class_A(u8g2,U8LOG_WIDTH, U8LOG_HEIGHT , u8log_buffer ) ;
 //p5__display__class p5__display__class_A ;
@@ -57,11 +68,12 @@ U8G2LOG u8g2log;
 
 #endif 
 
+    P5__STATUS_T P5__STATUS_A = P5__STATUS__INIT;
 
 
  void setup(void) {
     Serial.begin(115200);
-      Serial.println(" ST ");
+      Serial.println("SX");
 
 
 
@@ -95,51 +107,84 @@ U8G2LOG u8g2log;
  //p5__display__class_A.begin(u8g2,U8LOG_WIDTH, U8LOG_HEIGHT , u8log_buffer ) ;
     u8g2.begin();  
   
-    u8g2.setFont(u8g2_font_amstrad_cpc_extended_8f//u8g2_font_tom_thumb_4x6_mf);	// set the font for the terminal window
+    u8g2.setFont(u8g2_font_tom_thumb_4x6_mf  //u8g2_font_amstrad_cpc_extended_8f//u8g2_font_tom_thumb_4x6_mf);	// set the font for the terminal window
                 );
     u8g2log.begin(u8g2, U8LOG_WIDTH, U8LOG_HEIGHT, u8log_buffer);
     u8g2log.setLineHeightOffset(0);	// set extra space between lines in pixel, this can be negative
     u8g2log.setRedrawMode(0);		// 0: Update screen with newline, 1: Update screen for every char  
-      Serial.println(" SB ");
-
- 
+  //  u8g2log.print("\f  TEST55 \n");	
+      Serial.print(" SB ");
+       
+       
+        #if defined(P5__DISPLAY__DISABLE)
+            u8g2log.print("\f 5__DISPLAY__DISABLE \n");	
+         #else
+        #endif
+    //   p5__display__log__beg(u8g2log);
+    //     u8g2log.print(" SB ");
+        
+       //  p5__display__log__last(u8g2log,1);
+    
+    delay(2000);
    #endif
 
-    P5__STATUS_T P5__STATUS_A = P5__STATUS__INIT;
         
-     //  p5__pins__setup(p5__display__class_A , P5__STATUS_A);
-     //p5__pins__setup();
+     // p5__pins__setup();
      //  p5__router()
-     
-    //  p5__config__individual__init(P5__TASK__CONFIG_A);
-     
+             Serial.println("22");
+           
+
+           p5__pins__setup( P5__STATUS_A);
+             Serial.print("33");
+                 p5__config__individual__init(P5__TASK__CONFIG_A);
+            Serial.print("44");
+
     }
     
     
     
 unsigned long t = 0;
+unsigned long t_timestamp = 0;
 
     
 void loop(void) {
    
-//  #include "___P5_LIB/p5__task__loop.h"
+ #include "___P5_LIB/p5__task__loop.h"
 
   // delay(100);
    
  
     if ( t < millis() ) {
-    t = millis() + 15000;			// every 15 seconds
+    t = millis() + 300000;			// every 15 seconds
    // p5__display__print(u8g2,u8g2log, "\f");			// \f = form feed: clear the screen
     u8g2log.print("\f");	
   }
-    p5__display__print(u8g2,u8g2log,"t[");
-   // p5__display__print(u8g2,u8g2log,millis());
-   // p5__display__print(u8g2,u8g2log,"\n");
-       u8g2log.print(millis()); //todo  type class; p5__display__print(u8g2,u8g2log,millis());
-        u8g2log.print(u8g2,u8g2log,"\n"); //todo class type \n
   
-  delay(500);
-     Serial.println(" L");
+  
+  if ( t_timestamp < millis() ) {
+    t_timestamp = millis() + 10000;			// every 15 seconds
+   // p5__display__print(u8g2,u8g2log, "\f");			// \f = form feed: clear the screen
+    // u8g2log.print("t2[");
+     //  u8g2log.print(millis()); //todo  type class; p5__display__print(u8g2,u8g2log,millis());
+       // u8g2log.print("]\n"); //todo class type \n
+            Serial.println(" Ti");	
+             
+                u8g2log.print(" Ti ");
+                 #if defined(P5__DISPLAY__DISABLE)
+                #else
+                 p5__display__log__beg(u8g2log);
+                #endif
+                
+                u8g2log.print(millis());
+               p5__display__log__last(u8g2log,0);
+                u8g2log.print("\n");
+  }
+  
+  
+    
+  
+  delay(50);
+