a.binder 5 lat temu
rodzic
commit
1167a96c7e

+ 6 - 4
SE/schema/WPS_Functions/automation_driven/build.automation_driven.PRODUCT.submodule.xml

@@ -6,12 +6,13 @@
    <description>config for paths for generating files</description>
    <property name="automation_driven.submodule.PRODUCT.name"
       value="${automation_driven.PRODUCT.name}.submodule"/>
-   <!-- todo other dirs -->
-   <property  name="automation_driven.submodule.basedir" location="${WPS_Functions.basedir}/../../stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp"/> 
+   
+   <property  name="automation_driven.submodule.basedir" location="/Users/a.binder/Documents/Arduino/libraries/p5_automation_lib/"/>
+   <!--<property  name="automation_driven.submodule.basedir" location="${WPS_Functions.basedir}/../../stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/testing_pwm_amp"/>-->
    <property  name="automation_driven.submodule.repository" location="${automation_driven.repository}/submodule"/>
    <property  name="automation_driven.submodule.temp" location="${automation_driven.temp}/submodule"/>
    
-   <property  name="automation_driven.submodule.xsd" location="${automation_driven.basedir}/automation_driven.submodule.xsd"/>
+   <property  name="automation_driven.submodule.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.xsd"/>
    
    
    <property  name="automation_driven.submodule.struct.read.xml" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.xml"/>
@@ -21,7 +22,8 @@
    <property  name="automation_driven.submodule.struct.read.enumerate.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.enumerate.xsd"/>
    <property  name="automation_driven.submodule.struct.read.enumerate.xsl" location="${automation_driven.submodule.basedir}/automation_driven.submodule.struct.read.enumerate.xsl"/>
    
-   <property  name="automation_driven.submodule.struct.h" location="${automation_driven.submodule.basedir}/___P5_LIB/p5__struct.h"/>
+   <!--<property  name="automation_driven.submodule.struct.h" location="${automation_driven.submodule.basedir}/___P5_LIB/p5__struct.h"/>-->
+   <property  name="automation_driven.submodule.struct.h" location="${automation_driven.submodule.basedir}/_Slave_Ports_Status_struct.h"/>
    
    <property name="automation_driven.submodule.namespaces.xsd" location="${automation_driven.submodule.basedir}/automation_driven.submodule.namespaces.xsd"/>
    

+ 47 - 2
SE/schema/WPS_Functions/automation_driven/build_automation_driven.xml

@@ -43,9 +43,10 @@
    
    <target name="automation_driven.submodule.struct.read.xsd"
       description="to initially generate xsd from automation_driven.submodule.struct.h file">
+      <echo>#42 generating ${automation_driven.submodule.struct.read.xsd} using ${automation_driven.submodule.struct.h}</echo>
       <xslt basedir="${automation_driven.submodule.basedir}"
          destdir="${automation_driven.submodule.temp}"
-         force="false"
+         force="true"
          in="${empty.xml}"
          out="${automation_driven.submodule.struct.read.xsd}"
          style="${automation_driven.submodule.struct.read.xsl}"> <!-- ${automation_driven.submodule.struct.h} -->
@@ -83,9 +84,53 @@
       </xslt>
    </target>
    
+   <target name="automation_driven.submodule.xsd__struct_files"
+      description="to initially generate xsd ">
+      <echo>#42 generating ${automation_driven.submodule.struct.read.xsd} using ${automation_driven.submodule.xsd}</echo>
+      <xslt basedir="${automation_driven.submodule.basedir}"
+         destdir="${automation_driven.submodule.temp}"
+         force="true"
+         in="${automation_driven.submodule.xsd}"
+         out="${automation_driven.submodule.struct.read.xsd}"
+         style="${automation_driven.submodule.struct.read.xsl}"> <!-- ${automation_driven.submodule.struct.h} -->
+         <factory name="net.sf.saxon.TransformerFactoryImpl">
+            <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+            <!--<attribute name="http://saxon.sf.net/feature/initialTemplate"
+               value="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}read.xml"/>-->
+            <attribute name="http://saxon.sf.net/feature/initialMode"
+               value="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}read.xml"/>
+            <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
+               value="true"/>
+         </factory>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}basedir"
+            expression="${automation_driven.basedir}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}repository"
+            expression="${automation_driven.repository}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.xsd}temp"
+            expression="${automation_driven.temp}"/>
+         
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.xsd}basedir"
+            expression="${automation_driven.submodule.basedir}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.xsd}repository"
+            expression="${automation_driven.submodule.repository}"/>
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.xsd}temp"
+            expression="${automation_driven.submodule.temp}"/>
+         
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.struct.xsd}h"
+            expression="${automation_driven.submodule.struct.h}"/>
+         
+         <param name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.namespaces.xsd}xsd"
+            expression="${automation_driven.submodule.namespaces.xsd}"/>
+         
+         <classpath location="/opt/local/share/java/saxon9he.jar"/>
+         <xmlcatalog refid="dita-ot.dtd.catalog"/>
+      </xslt>
+   </target>
+   
    
    <target name="automation_driven.submodule.struct.read.enumerate.xsd"
-      description="to enumerate unique attributes " depends="automation_driven.submodule.struct.read.xsd">
+      description="to enumerate unique attributes " depends="automation_driven.submodule.xsd__struct_files">
+      <echo>#42 generating ${automation_driven.submodule.struct.read.enumerate.xsd} using ${automation_driven.submodule.struct.read.xsd}</echo>
       <xslt basedir="${automation_driven.submodule.basedir}"
          destdir="${automation_driven.submodule.temp}"
          force="true"

+ 2 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/config_Active_ControllerID.h

@@ -8,8 +8,8 @@ EEPROM.get( EEPROM_Active_ControllerID_addr, EEPROM_Active_ControllerID_read );
 //EEPROM_Active_ControllerID_read = EEPROM.read(EEPROM_Active_ControllerID_addr);
 */
 //#define Active_ControllerID 0x13
-//#define Active_ControllerID 0x11
-#define Active_ControllerID 0x35
+#define Active_ControllerID 0x11
+//#define Active_ControllerID 0x35
 
 
 //if(EEPROM_Active_ControllerID_read > 0 ) //{

+ 0 - 9
SE/stuff/P5_Automation_can-dev/_Slave_Ports_Protocol.cppppp

@@ -1,9 +0,0 @@
-#include "_Slave_Ports_Protocol.h"
-
-
-/*
-
- _Slave_Ports_Protocol_CAN_broadcast_AS  _Slave_Ports_Protocol_CAN_broadcast_F( _Slave_Ports_Protocol_CAN_broadcast_T _Slave_Ports_Protocol_CAN_broadcast_A ) {
-  return {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
-}
-*/

+ 30 - 5
SE/stuff/p5_automation_lite/p5_automation_lite.ino

@@ -8,7 +8,7 @@
 #define ARDUINO_ARRAY_INDEX_LIMIT_I2C_ARRAY_DRIVER_DEF 1
 #define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_DEF 0 // 3 //todo debug
 
-#define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_MENU_DEF 1 //todo test
+#define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_MENU_DEF 2 //todo test
 
 #define ARDUINO_ARRAY_INDEX_LIMIT_DISPLAY_MENU_ITEM_A_DEF  5 //todo debug 
 #define ARDUINO_ARRAY_INDEX_LIMIT_PORTS_DEF 4//3 //todo debug lite
@@ -156,7 +156,10 @@
  #if defined(HAS_u8x8)
        #include "u8x8_struct.h"
    #endif
-  
+   
+  #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
+        #include "SERIAL_PROXY_DISPLAY_MASTER__struct.h"
+  #endif
 
 
 #if defined(HAS__PCINT_setup)
@@ -262,11 +265,13 @@
 #endif
 
 #if defined(HAS_SERIAL_PROXY_DISPLAY_SLAVE) 
-    SoftwareSerial SERIAL_PROXY_DISPLAY_SLAVE(SERIAL_PROXY_DISPLAY_SLAVE_rx_pin, SERIAL_PROXY_DISPLAY_SLAVE_tx_pin); // RX, TX
+    SoftwareSerial SERIAL_PROXY_DISPLAY_DEVICE(SERIAL_PROXY_DISPLAY_SLAVE_rx_pin, SERIAL_PROXY_DISPLAY_SLAVE_tx_pin); // RX, TX
+    #include "SoftwareSerial__func.h"
 #endif
 
 #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
-    SoftwareSerial SERIAL_PROXY_DISPLAY_MASTER(SERIAL_PROXY_DISPLAY_MASTER_rx_pin, SERIAL_PROXY_DISPLAY_MASTER_tx_pin); // RX, TX
+    SoftwareSerial SERIAL_PROXY_DISPLAY_DEVICE(SERIAL_PROXY_DISPLAY_MASTER_rx_pin, SERIAL_PROXY_DISPLAY_MASTER_tx_pin); // RX, TX
+    #include "SoftwareSerial__func.h"
 #endif
 
 
@@ -325,7 +330,12 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     #if defined(HAS_u8x8)
          #include "u8x8__setup.h"
    #endif
-  
+    
+     #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
+         pinMode(SERIAL_PROXY_DISPLAY_MASTER_rx_pin, INPUT);
+         pinMode(SERIAL_PROXY_DISPLAY_MASTER_tx_pin, OUTPUT);
+         SERIAL_PROXY_DISPLAY_DEVICE.begin(38400);
+     #endif
 
 }
 
@@ -348,5 +358,20 @@ void loop() {
          #include "__main_loop_top.h" //lite ___loop/
          #include "__main_loop_end.h" //lite ___loop/
          
+         
+          #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER) 
+             if (SERIAL_PROXY_DISPLAY_DEVICE.available()) {
+                 Serial.print(F("S:"));
+                 Serial.write(SERIAL_PROXY_DISPLAY_DEVICE.read());
+                 }
+              /*    if (SERIAL_PROXY_DISPLAY_MASTER.available())
+                 Serial.write(SERIAL_PROXY_DISPLAY_MASTER.read());
+                if (Serial.available())
+                  SERIAL_PROXY_DISPLAY_MASTER.write(Serial.read());
+                  */
+              //  Serial.print(F("MD."));
+              //  SERIAL_PROXY_DISPLAY_MASTER.write("MD");
+
+         #endif
 }