a.binder пре 5 година
родитељ
комит
a1aa061cfb
24 измењених фајлова са 110 додато и 32 уклоњено
  1. 12 9
      SE/stuff/P5_Automation_can-dev-res/P5_Automation_can-dev-res.ino
  2. 1 1
      SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x101/config_Active_ControllerID_0x101.h
  3. 0 0
      SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x101/config_Slave_Ports_LOCAL_0x101_init.h
  4. 10 0
      SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x103/config_Active_ControllerID_0x103.h
  5. 0 0
      SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x103/config_Slave_Ports_LOCAL_0x103_init.h
  6. 0 0
      SE/stuff/P5_Automation_can-dev-res/___CONFIG/config_Slave_Ports_LOCAL_init.h
  7. 0 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x101/___DEBUG_DISABLE_INIT__0x101.h
  8. 0 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x101/___DEBUG_DISABLE_LOOP__0x101.h
  9. 0 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x101/___DEBUG_DISABLE_SETUP__0x101.h
  10. 0 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x103/___DEBUG_DISABLE_INIT__0x103.h
  11. 1 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x103/___DEBUG_DISABLE_LOOP__0x103.h
  12. 0 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x103/___DEBUG_DISABLE_SETUP__0x103.h
  13. 5 2
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_INIT.h
  14. 16 2
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_LOOP.h
  15. 1 0
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_LOOP_MAIN_A.h
  16. 6 2
      SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_SETUP.h
  17. 15 0
      SE/stuff/P5_Automation_can-dev-res/___loop/___loop_init.h
  18. 8 5
      SE/stuff/P5_Automation_can-dev-res/__main_init.h
  19. 22 1
      SE/stuff/P5_Automation_can-dev-res/__main_register.h
  20. 12 0
      SE/stuff/P5_Automation_can-dev-res/__main_struct.h
  21. 0 0
      SE/stuff/P5_Automation_can-dev-res/_bak/_Slave_Ports_Status_func.bakh.h
  22. 0 0
      SE/stuff/P5_Automation_can-dev-res/doc/P5_Automation_can-dev.graphml
  23. 0 0
      SE/stuff/P5_Automation_can-dev-res/doc/P5_Automation_can-dev.numbers
  24. 1 10
      SE/stuff/P5_Automation_can-dev/P5_Automation_can-dev.xpr

+ 12 - 9
SE/stuff/P5_Automation_can-dev-res/P5_Automation_can-dev-res.ino

@@ -112,18 +112,18 @@
 //#define Active_ControllerID _ControllerID 
 //#define Active_ControllerID _Slave1_ID 
 
-#include "config_Active_ControllerID.h" //there kleep id of device
+#include "___CONFIG/config_Active_ControllerID.h" //there kleep id of device
 
 //#include "config_Slave_Ports_LOCAL_0x101_init.h" //there kleep config of this id device
 
 
 #if Active_ControllerID == 0x101 
-     #include "config_Active_ControllerID_0x101.h"
+     #include "___CONFIG/0x101/config_Active_ControllerID_0x101.h"
 #endif
 
 
 #if Active_ControllerID == 0x103 
-    #include "config_Active_ControllerID_0x103.h"  //there kleep config of this id device
+    #include "___CONFIG/0x103/config_Active_ControllerID_0x103.h"  //there kleep config of this id device
 #endif
 
 
@@ -290,16 +290,16 @@
     #include "_PCINT_init.h"
 #endif
 
-#include "config_Slave_Ports_LOCAL_init.h"
+#include "___CONFIG/config_Slave_Ports_LOCAL_init.h"
 
 
 #if Active_ControllerID == 0x101 
-     #include "config_Slave_Ports_LOCAL_0x101_init.h"
+     #include "___CONFIG/0x101/config_Slave_Ports_LOCAL_0x101_init.h"
 #endif
 
 
 #if Active_ControllerID == 0x103 
-    #include "config_Slave_Ports_LOCAL_0x103_init.h"
+    #include "___CONFIG/0x103/config_Slave_Ports_LOCAL_0x103_init.h"
 #endif
 
 
@@ -313,7 +313,7 @@
 #include "__main_init.h"
 
  #ifdef DISABLE_LOOP 
-        #include "___DEBUG_DISABLE_INIT.h"
+        #include "___DEBUG/___DEBUG_DISABLE_INIT.h"
     #endif
 
 
@@ -389,7 +389,7 @@ void setup() {
     #endif
 
  #ifdef DISABLE_LOOP 
-        #include "___DEBUG_DISABLE_SETUP.h"
+        #include "___DEBUG/___DEBUG_DISABLE_SETUP.h"
     #endif
 
 
@@ -409,6 +409,7 @@ void setup() {
 
 
 void loop() {
+#include "___loop/___loop_init.h"
  
 #if defined(HAS__PCINT_setup)
   #include "_PCINT_loop.h"
@@ -424,7 +425,7 @@ void loop() {
   time = millis();
 
     #ifdef DISABLE_LOOP 
-        #include "___DEBUG_DISABLE_LOOP.h"
+        #include "___DEBUG/___DEBUG_DISABLE_LOOP.h"
     #endif
     #include "__main_loop_top.h"
     
@@ -459,6 +460,8 @@ void loop() {
                     TASK_TYPE_T__EMPTY__JUST_PASSED_ARG__,
                     TASK_PORT_ASSOC_EMPTY
                  );
+              #else 
+                #include "___DEBUG/___DEBUG_DISABLE_LOOP_MAIN_A.h"
               #endif
 }
  // Serial.println(time);

+ 1 - 1
SE/stuff/P5_Automation_can-dev-res/config_Active_ControllerID_0x101.h → SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x101/config_Active_ControllerID_0x101.h

@@ -9,6 +9,6 @@
 
 #define DEBUG 5 
 
-//#define DISABLE_LOOP //To debug and disable any output
+#define DISABLE_LOOP //To debug and disable any output
 
 

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/config_Slave_Ports_LOCAL_0x101_init.h → SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x101/config_Slave_Ports_LOCAL_0x101_init.h


+ 10 - 0
SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x103/config_Active_ControllerID_0x103.h

@@ -0,0 +1,10 @@
+
+//there kleep config of this id device#define HAS_TFT_ILI9163C 
+// #define HAS_LCD1602 
+//#define HAS_ROTTARY_SW
+
+#define HAS_I2C_driver_Adafruit_PWMServoDriver 
+
+
+#define DEBUG 5 
+#define DISABLE_LOOP //To debug and disable any output

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/config_Slave_Ports_LOCAL_0x103_init.h → SE/stuff/P5_Automation_can-dev-res/___CONFIG/0x103/config_Slave_Ports_LOCAL_0x103_init.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/config_Slave_Ports_LOCAL_init.h → SE/stuff/P5_Automation_can-dev-res/___CONFIG/config_Slave_Ports_LOCAL_init.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_INIT__0x101.h → SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x101/___DEBUG_DISABLE_INIT__0x101.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_LOOP__0x101.h → SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x101/___DEBUG_DISABLE_LOOP__0x101.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_SETUP__0x101.h → SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x101/___DEBUG_DISABLE_SETUP__0x101.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_INIT__0x103.h → SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x103/___DEBUG_DISABLE_INIT__0x103.h


+ 1 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_LOOP__0x103.h → SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x103/___DEBUG_DISABLE_LOOP__0x103.h

@@ -23,3 +23,4 @@ struct Adafruit_PWMServoDriver_BEGIN_S {
 
 typedef struct Adafruit_PWMServoDriver_BEGIN_S Adafruit_PWMServoDriver_BEGIN_T
 */
+

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_SETUP__0x103.h → SE/stuff/P5_Automation_can-dev-res/___DEBUG/0x103/___DEBUG_DISABLE_SETUP__0x103.h


+ 5 - 2
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_INIT.h

@@ -1,10 +1,13 @@
 
+
+
+
 #if Active_ControllerID == 0x101 
-     #include "___DEBUG_DISABLE_INIT__0x101.h"
+     #include "0x101/___DEBUG_DISABLE_INIT__0x101.h"
 #endif
 
 
 #if Active_ControllerID == 0x103 
-    #include "___DEBUG_DISABLE_INIT__0x103.h" 
+    #include "0x103/___DEBUG_DISABLE_INIT__0x103.h" 
 #endif
 

+ 16 - 2
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_LOOP.h

@@ -1,10 +1,24 @@
 
+//register ARDUINO_STATE_T LED_BUILTIN_STATE_A  = false ;
+
+
+/*
+if(time % 1000) {
+    Serial.print("time: ["); Serial.print(time) ; Serial.println("] "); 
+  //  LED_BUILTIN_STATE_A = !LED_BUILTIN_STATE_A ;
+  //  digitalWrite(LED_BUILTIN, LED_BUILTIN_STATE_A);   // turn the LED on (HIGH is the voltage level)
+  
+  //digitalWrite(LED_BUILTIN, LED_BUILTIN_STATE);    // turn the LED off by making the voltage LOW
+   
+}
+*/
+
 #if Active_ControllerID == 0x101 
-     #include "___DEBUG_DISABLE_LOOP__0x101.h"
+     #include "0x101/___DEBUG_DISABLE_LOOP__0x101.h"
 #endif
 
 
 #if Active_ControllerID == 0x103 
-    #include "___DEBUG_DISABLE_LOOP__0x103.h" 
+    #include "0x103/___DEBUG_DISABLE_LOOP__0x103.h" 
 #endif
 

+ 1 - 0
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_LOOP_MAIN_A.h

@@ -0,0 +1 @@
+ Serial.print("time: ["); Serial.print(time) ; Serial.println("] ");

+ 6 - 2
SE/stuff/P5_Automation_can-dev-res/___DEBUG/___DEBUG_DISABLE_SETUP.h

@@ -1,10 +1,14 @@
 
+
+ pinMode(LED_BUILTIN, OUTPUT);
+
+
 #if Active_ControllerID == 0x101 
-     #include "___DEBUG_DISABLE_SETUP__0x101.h"
+     #include "0x101/___DEBUG_DISABLE_SETUP__0x101.h"
 #endif
 
 
 #if Active_ControllerID == 0x103 
-    #include "___DEBUG_DISABLE_SETUP__0x103.h" 
+    #include "0x103/___DEBUG_DISABLE_SETUP__0x103.h" 
 #endif
 

+ 15 - 0
SE/stuff/P5_Automation_can-dev-res/___loop/___loop_init.h

@@ -0,0 +1,15 @@
+
+
+register ARDUINO_LOOP_LATENCY_T      ARDUINO_LOOP_LATENCY__MAIN_A = 100 ; //EVERY 10 LOOPS INIT THIS LATENCY
+register ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A = 0 ;// = ARDUINO_LOOP_LATENCY_COUNTER_INIT ; //WILL decrement
+
+
+
+
+register ARDUINO_LOOP_LATENCY_T     ARDUINO_LOOP_LATENCY__MAIN_END_A = 100 ; //EVERY 10 LOOPS INIT THIS LATENCY
+register ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A = ARDUINO_LOOP_LATENCY_COUNTER_INIT ; //WILL DECREMENT
+
+
+register long time;
+
+

+ 8 - 5
SE/stuff/P5_Automation_can-dev-res/__main_init.h

@@ -1,13 +1,16 @@
+
+
+
 ARDUINO_FUNCT_INIT_RESULT_T ARDUINO_FUNCT_INIT_RESULT_Slave_Ports_queue__add ;
 ARDUINO_FUNCT_INIT_RESULT_T ARDUINO_FUNCT_INIT_RESULT__Slave_Ports_LOCAL_init ;
 
 
-
-ARDUINO_LOOP_LATENCY_T                  ARDUINO_LOOP_LATENCY__MAIN_A = 100 ; //EVERY 10 LOOPS INIT THIS LATENCY
-ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A = ARDUINO_LOOP_LATENCY_COUNTER_INIT ; //WILL decrement
+/*
+ARDUINO_LOOP_LATENCY_T      ARDUINO_LOOP_LATENCY__MAIN_A = 100 ; //EVERY 10 LOOPS INIT THIS LATENCY
+ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A = 0 ;// = ARDUINO_LOOP_LATENCY_COUNTER_INIT ; //WILL decrement
 
 
 
 
-ARDUINO_LOOP_LATENCY_T                  ARDUINO_LOOP_LATENCY__MAIN_END_A = 100 ; //EVERY 10 LOOPS INIT THIS LATENCY
-ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A = ARDUINO_LOOP_LATENCY_COUNTER_INIT ; //WILL DECREMENT
+ARDUINO_LOOP_LATENCY_T     ARDUINO_LOOP_LATENCY__MAIN_END_A = 100 ; //EVERY 10 LOOPS INIT THIS LATENCY
+ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A = ARDUINO_LOOP_LATENCY_COUNTER_INIT ; //WILL DECREMENT*/

+ 22 - 1
SE/stuff/P5_Automation_can-dev-res/__main_register.h

@@ -16,4 +16,25 @@ does not mean that the variable will be stored in a register.
 It means that it MIGHT be stored in a register depending on hardware and 
 implementation restrictions.
 
-*/
+*/
+
+
+/*
+A register variable cannot be used as a "global" variable, 
+because file scope variables have static storage, 
+thus by definition they have an address. register variables are exactly the contrary, 
+that are variables for which you, the programmer, promise to never take their address.
+ So combining the two makes not much sense.
+
+BTW, the error message that you get is not very helpful. 
+It seems that your compiler is referring to an extension that allows to fix 
+a register variable to a particular hardware register. If you post such an error 
+message please also give an indication which compiler and/or platform you are using.
+*/
+
+
+//register ARDUINO_LOOP_LATENCY_T       
+//register ARDUINO_LOOP_LATENCY__MAIN_A  ; //EVERY 10 LOOPS INIT THIS LATENCY
+//register ARDUINO_LOOP_LATENCY_T          ARDUINO_LOOP_LATENCY__MAIN_END_A  ; //EVERY 10 LOOPS INIT THIS LATENCY
+//register ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A ;
+//register ARDUINO_LOOP_LATENCY_COUNTER_T  ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A = NULL ; //WILL decrement

+ 12 - 0
SE/stuff/P5_Automation_can-dev-res/__main_struct.h

@@ -23,7 +23,19 @@ The example above defines two variables with in the same storage class.
 
 */
 
+
+//GLOBAL TYPES
+
 typedef int  ARDUINO_SIZE_T ; //for display etc
+
+typedef boolean  ARDUINO_STATE_T ; //for states of ports etc
+
+
+//EOF GLOBAL TYPES
+
+
+
+
 typedef ARDUINO_SIZE_T  ARDUINO_SIZE_MIN_T ; //for display etc
 typedef ARDUINO_SIZE_T  ARDUINO_SIZE_MAX_T ; //for display etc
 

+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_func.bakh.h → SE/stuff/P5_Automation_can-dev-res/_bak/_Slave_Ports_Status_func.bakh.h


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/P5_Automation_can-dev.graphml → SE/stuff/P5_Automation_can-dev-res/doc/P5_Automation_can-dev.graphml


+ 0 - 0
SE/stuff/P5_Automation_can-dev-res/P5_Automation_can-dev.numbers → SE/stuff/P5_Automation_can-dev-res/doc/P5_Automation_can-dev.numbers


+ 1 - 10
SE/stuff/P5_Automation_can-dev/P5_Automation_can-dev.xpr

@@ -2,16 +2,7 @@
 <project version="22.0">
     <meta>
         <filters directoryPatterns="" filePatterns="\QP5_Automation_can-dev.xpr\E" positiveFilePatterns="" showHiddenFiles="false"/>
-        <options>
-            <serialized version="22.0" xml:space="preserve">
-                <serializableOrderedMap>
-                    <entry>
-                        <String>enable.project.master.files.support</String>
-                        <Boolean>true</Boolean>
-                    </entry>
-                </serializableOrderedMap>
-            </serialized>
-        </options>
+        <options/>
     </meta>
     <projectTree name="P5_Automation_can-dev.xpr">
         <folder name="Arduino">