a.binder 5 лет назад
Родитель
Сommit
8b8b04c353

+ 9 - 26
SE/stuff/P5_Automation_can-dev-res-working-1930/P5_Automation_can-dev-res-working-1930.ino

@@ -373,11 +373,6 @@ etc. To deactivate the Serial printing, define the macro empty:
 
   
 
-#if defined(HAS_ROTTARY_SW)
- #include "_ROTTARY_SW/_ROTTARY_SW_init.h"  //empty
-#endif
-
-
 
 #if defined(HAS__PCINT_setup)
      #include "_PCINT/_PCINT_init.h"
@@ -440,23 +435,10 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
          Serial.println("#329 Serial.begin(115200)");
 #endif
 
+ARDUINO_SETUP_DEF_T HAS_ROTTARY_SW_A = false;
+//#include "___CONFIG/0x11/setup_Active_ControllerID_0x11.h"
 
-//    Serial.begin(9600);
-//    Serial.println("#233 setup" );
-// _LCD_print_queue.push(1);
-// _LCD_print_queue.push(2);
-// _LCD_print_queue.push(3);
 
-//String character = "Geas";
-//char b = abc.charAt(0); 
-//int b_ascii_value = b;
-
- // LCD_print_background_add( _LCD_print_buffors,            0,           0,           0,              "W",              5000,              6000);
- // LCD_print_background_add( _LCD_print_buffors,            1,           0,           0,              "H",              5000,              6000);
- // LCD_print_background_add( _LCD_print_buffors,            2,           0,           0,              "W",              5000,              6000);
- // LCD_print_background_add( _LCD_print_buffors,            3,           0,           0,              "K",              5000,              6000);
-
- 
 //todo PCINT service
 #if defined(DISABLE_LOOP) || defined(DEBUG)
          Serial.println("#375 will include ___main/__main_I2C_setup.h");
@@ -480,25 +462,30 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
  LCDarray2.concat(String(Active_ControllerID, HEX) ) ;
  */
 
-
+ARDUINO_SETUP_DEF_T HAS_I2C_driver_Adafruit_PWMServoDriver_A = false;
 #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)        
             #if  defined(DISABLE_LOOP) || defined(DEBUG) || defined(DEBUG_I2C_driver_Adafruit_PWMServoDriver)
                      Serial.println("#401 will include /_I2C_driver_Adafruit_PWMServoDriver_setup.h");
             #endif
     
-         #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_setup.h"
+         #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_setup.h" //not any changes
 #endif
   
   // put your setup code here, to run once:
+ARDUINO_SETUP_DEF_T HAS_LCD1602_A = false; //todo
   #if defined(HAS_LCD1602)
    #include "_LCD1602_setup.h"
   #endif
 
+
+ARDUINO_SETUP_DEF_T HAS_TFT_ILI9163C_A = false ; //todo
   #if defined(HAS_TFT_ILI9163C)
     #include "_TFT_ILI9163C_setup.h"
   #endif 
  
   //BEGIN CAN
+  
+  
   #include "_CAN/_CAN_setup.h"
  
    #if defined(HAS_LCD1602) 
@@ -545,10 +532,6 @@ register long time;
   time = millis();
 #include "___loop/___loop_init.h"
  
-#if defined(HAS__PCINT_setup)
-  #include "_PCINT/_PCINT_loop.h"
-#endif 
-
  
  
 #if defined(HAS_ROTTARY_SW)

+ 0 - 48
SE/stuff/P5_Automation_can-dev-res-working-1930/_PCINT/_PCINT_loop.h

@@ -1,48 +0,0 @@
-/* uint8_t count;
-  Serial.print(".");
- // delay(1000);                                // every second,
-  for (i=0; i < TOTAL_PINS; i++) {
-    if (interrupt_count[i] != 0) {            // look at all the interrupted pins
-      count=interrupt_count[i];               // store its count since the last iteration
-      interrupt_count[i]=0;                   // and reset it to 0.
-      Serial.print("Count for pin ");
-      if (i == 50) { Serial.print("MISO"); }  // then tell the user what it was, in a friendly way.
-      else if (i == 51) { Serial.print("MOSI"); }
-      else if (i == 52) { Serial.print("SCK"); }
-      else if (i == 53) { Serial.print("SS"); }
-      else if (i < FIRST_ANALOG_PIN) {
-        Serial.print("D");
-        Serial.print(i, DEC);
-      } else {
-        Serial.print("A");
-        Serial.print(i-FIRST_ANALOG_PIN, DEC);
-      }
-      Serial.print(" is ");
-      Serial.println(count, DEC);
-    }
-  }
-  if (currentPIN3Count != pin3Count) {        // Print our monotonically increasing counter (no reset to 0)
-      Serial.print(PIN3TEXT);
-      Serial.print(" count update: "); Serial.print(pin3Count, DEC); Serial.println();
-      currentPIN3Count=pin3Count;
-  }
-
-  */
-/*
- Serial.print("Port : A8 " );
- Serial.print(A8);
-Serial.print(" digitalPinToPort(A8)::: " );
- Serial.println( digitalPinToPort(A8));
-
- 
- Serial.print("Port : A9 " );
- Serial.print(A9);
-Serial.print(" digitalPinToPort(A9)::: " );
- Serial.println( digitalPinToPort(A9));
-
- 
- Serial.print("Port : A10 " );
- Serial.print(A10);
-Serial.print(" digitalPinToPort(A10)::: " );
- Serial.println( digitalPinToPort(A10));
- */

+ 0 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/_ROTTARY_SW/_ROTTARY_SW_init.h

@@ -1 +0,0 @@
-

+ 4 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x11/setup_Active_ControllerID_0x11.h

@@ -0,0 +1,4 @@
+if(EEPROM_Active_ControllerID_read_A == 0x11) {
+HAS_ROTTARY_SW_A = true ; //#define HAS_ROTTARY_SW
+HAS_I2C_driver_Adafruit_PWMServoDriver_A = true ; 
+}

+ 2 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___main/__main_struct.h

@@ -35,6 +35,8 @@ typedef int  ARDUINO_SIZE_T ; //for display etc
 
 typedef boolean  ARDUINO_STATE_T ; //for states of ports etc
 
+typedef boolean  ARDUINO_SETUP_DEF_T ; //for states of ports etc
+
 
 //EOF GLOBAL TYPES