|
|
@@ -15,7 +15,8 @@
|
|
|
xmlns:automation_driven.submodule.prototypes="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.prototypes.xsd"
|
|
|
xmlns:automation_driven.submodule.appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.appinfo.xsd"
|
|
|
xmlns:automation_driven.submodule.namespaces="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.namespaces.xsd"
|
|
|
- xmlns:automation_driven.submodule.runtime="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.runtime.xsd">
|
|
|
+ xmlns:automation_driven.submodule.runtime="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.runtime.xsd"
|
|
|
+ xmlns:automation_driven.submodule.main.setup="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.main.setup.xsd">
|
|
|
<xs:annotation>
|
|
|
<xs:documentation>Struiktura pliku glownego ...main.ino ...</xs:documentation>
|
|
|
</xs:annotation>
|
|
|
@@ -31,77 +32,197 @@
|
|
|
<xs:import
|
|
|
namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/automation_driven/automation_driven.submodule.runtime.xsd"
|
|
|
schemaLocation="automation_driven.submodule.runtime.xsd"/>
|
|
|
- <xs:complexType name="define_1">
|
|
|
- <xs:complexContent>
|
|
|
- <xs:extension base="automation_driven.submodule.prototypes:define">
|
|
|
- <xs:attribute id="A2817256C-FF92-49C8-958B-59BE01668156"
|
|
|
- ref="automation_driven.submodule.namespaces:HAS_u8g2"/>
|
|
|
- <xs:attribute fixed="5" id="A0456DEBC-B073-4083-A0A6-E5D294C8A241"
|
|
|
- ref="automation_driven.submodule.namespaces:DEBUG__I2C" use="optional"/>
|
|
|
- </xs:extension>
|
|
|
- </xs:complexContent>
|
|
|
- </xs:complexType>
|
|
|
- <xs:element name="define_1" type="automation_driven.submodule.main:define_1"/>
|
|
|
- <xs:complexType name="include_1">
|
|
|
- <xs:complexContent>
|
|
|
- <xs:extension base="automation_driven.submodule.prototypes:include">
|
|
|
- <xs:attribute id="AB35E2D50-E3E5-4FFB-A8C1-D33E5B5E7634"
|
|
|
- ref="automation_driven.submodule.namespaces:U8g2lib.h"/>
|
|
|
- <xs:attribute ref="automation_driven.submodule.namespaces:Arduino.h"/>
|
|
|
- <xs:attribute id="AB42E4C39-DB0C-4B38-9703-08B022138DF0"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__struct__simpleTypes.h"/>
|
|
|
- <xs:attribute id="A4CF27D81-D1BB-4ED5-86F5-AE56C720AF6A"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__struct.h"/>
|
|
|
- <xs:attribute id="A94C5F335-63FA-4FC2-B9E8-0C489DF82EB6"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__progmem.h"/>
|
|
|
- <xs:attribute id="A592D07C2-D0EB-4C59-806A-4119935BF18A"
|
|
|
- ref="automation_driven.submodule.namespaces:pins.h"/>
|
|
|
- <xs:attribute id="AFCE7379B-2CA8-4AE2-AB62-D1CA866813BE"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__pins__setup.h"/>
|
|
|
- <xs:attribute id="A45582F3D-C284-4541-9703-BA5FC02D21D6"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__task___attr.h"/>
|
|
|
- <xs:attribute id="A9347D9F9-163E-43F8-B972-F42C8115D6C3"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__task___attr__reply_list.h"/>
|
|
|
- <xs:attribute id=" A27909C34-109A-491C-960A-02CD1D2599D5"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__display.h"/>
|
|
|
- <xs:attribute ref="automation_driven.submodule.namespaces:p5__pwm.h"/>
|
|
|
- <xs:attribute id="AC3C057DA-C596-4027-94C8-0EF10734385D"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__swing.h"/>
|
|
|
- <xs:attribute id="AB41EC322-A4F1-4760-B900-85E369652809"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__i2c.h"/>
|
|
|
- <xs:attribute id="AFB4D80A9-BB63-428E-ABF2-AF2AC414E0A5"
|
|
|
- ref="automation_driven.submodule.namespaces:p5__task.h"/>
|
|
|
- <xs:attribute id="AFC729C81-4508-415D-9270-F43459C660A6"
|
|
|
- ref="automation_driven.submodule.namespaces:SPI.h"/>
|
|
|
- <xs:attribute id="AB89497B4-D12C-404A-A6B7-91E3101691FE"
|
|
|
- ref="automation_driven.submodule.namespaces:Wire.h"/>
|
|
|
- <xs:attribute id="AE9DCC146-C5E0-404B-88AE-77197742693E"
|
|
|
- ref="automation_driven.submodule.namespaces:config_individual.h"/>
|
|
|
- <xs:attribute id="A141F5180-09E3-4AE6-A1DE-9D5FC32A42FA"
|
|
|
- ref="automation_driven.submodule.namespaces:config_defaults.h"/>
|
|
|
- </xs:extension>
|
|
|
- </xs:complexContent>
|
|
|
- </xs:complexType>
|
|
|
- <xs:element name="include_1" type="automation_driven.submodule.main:include_1"/>
|
|
|
- <xs:complexType name="if_defined_1_if_defined">
|
|
|
- <xs:complexContent>
|
|
|
- <xs:restriction base="automation_driven.submodule.prototypes:define">
|
|
|
- <xs:attribute ref="automation_driven.submodule.namespaces:HAS_u8g2"/>
|
|
|
- </xs:restriction>
|
|
|
- </xs:complexContent>
|
|
|
- </xs:complexType>
|
|
|
- <xs:complexType name="if_defined_1">
|
|
|
- <xs:complexContent>
|
|
|
- <xs:restriction base="automation_driven.submodule.prototypes:if_defined">
|
|
|
- <xs:sequence>
|
|
|
- <xs:element name="if_defined"
|
|
|
- type="automation_driven.submodule.main:if_defined_1_if_defined"
|
|
|
- id="AA62F3878-788F-4BC2-97F7-E3104F4011AB"/>
|
|
|
- <xs:element name="initiate_global_using_public_lib_classname"
|
|
|
- type="automation_driven.submodule.runtime:U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C"
|
|
|
- id="A324F7D85-AEF1-419D-90EA-08C27F70AEC5"/>
|
|
|
- </xs:sequence>
|
|
|
- </xs:restriction>
|
|
|
- </xs:complexContent>
|
|
|
- </xs:complexType>
|
|
|
+ <xs:element name="main" type="automation_driven.submodule.appinfo:insert__code">
|
|
|
+ <xs:annotation>
|
|
|
+ <xs:appinfo>
|
|
|
+
|
|
|
+
|
|
|
+ #include <Arduino.h> //A2E49094B-C3C0-4E83-B080-F7C0FC799544
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #include <U8g2lib.h> //AB35E2D50-E3E5-4FFB-A8C1-D33E5B5E7634
|
|
|
+ #define HAS_u8g2 //A2817256C-FF92-49C8-958B-59BE01668156
|
|
|
+
|
|
|
+ //#define P5__DISPLAY__DISABLE
|
|
|
+ #define P5__DEBUG 0 //A20E03BC7-C9CD-45BF-9583-38AA1F73B21E
|
|
|
+ #define DISABLE_u8g2log //A1A017F06-F25F-4ED6-9254-F3005F3AB6EA
|
|
|
+ #define DISABLE_ASSERT //A57FE5314-CC99-41D4-86D0-AACF851332CB
|
|
|
+
|
|
|
+ #define Active_ControllerID 0x20 //A6C6D1D08-A030-413F-96EE-926CF85E1FE2
|
|
|
+
|
|
|
+
|
|
|
+ #define DEBUG__I2C 5 //A0456DEBC-B073-4083-A0A6-E5D294C8A241
|
|
|
+ //#define DISABLE__P5__TASK__DISPLAY
|
|
|
+ //#include <StandardCplusplus.h>
|
|
|
+ //#include <vector>
|
|
|
+ //#include <iterator>
|
|
|
+
|
|
|
+ #include "___P5_LIB/p5__struct__simpleTypes.h" //AB42E4C39-DB0C-4B38-9703-08B022138DF0
|
|
|
+ #include "___P5_LIB/p5__struct.h" //A4CF27D81-D1BB-4ED5-86F5-AE56C720AF6A
|
|
|
+ #include "___P5_LIB/p5__progmem.h" //A94C5F335-63FA-4FC2-B9E8-0C489DF82EB6
|
|
|
+
|
|
|
+ //#include "___P5_LIB/p5__router.h" todo?
|
|
|
+ #include "___CONFIG/pins.h" //A592D07C2-D0EB-4C59-806A-4119935BF18A
|
|
|
+ #include "___P5_LIB/p5__pins__setup.h" //AFCE7379B-2CA8-4AE2-AB62-D1CA866813BE
|
|
|
+
|
|
|
+ #include "___P5_LIB/p5__task___attr.h" //A45582F3D-C284-4541-9703-BA5FC02D21D6
|
|
|
+ #include "___P5_LIB/p5__task___attr__reply_list.h" //A9347D9F9-163E-43F8-B972-F42C8115D6C3
|
|
|
+
|
|
|
+ #include "___P5_LIB/p5__display.h" // A27909C34-109A-491C-960A-02CD1D2599D5
|
|
|
+
|
|
|
+ //#include "___P5_LIB/p5__intro.h" //not exists yet
|
|
|
+ #include "___P5_LIB/p5__pwm.h" // AC4461630-52F8-4419-8903-EBAA5C0CBA32
|
|
|
+ #include "___P5_LIB/p5__swing.h" //AC3C057DA-C596-4027-94C8-0EF10734385D
|
|
|
+ #include "___P5_LIB/p5__i2c.h" //AB41EC322-A4F1-4760-B900-85E369652809
|
|
|
+
|
|
|
+ //#include "___P5_LIB/p5__pins__setup.h"
|
|
|
+
|
|
|
+
|
|
|
+ #include "___P5_LIB/p5__task.h" //AFB4D80A9-BB63-428E-ABF2-AF2AC414E0A5
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #include <SPI.h> // AFC729C81-4508-415D-9270-F43459C660A6
|
|
|
+ #include <Wire.h> //AB89497B4-D12C-404A-A6B7-91E3101691FE
|
|
|
+
|
|
|
+
|
|
|
+ #include "___CONFIG/config_individual.h" //AE9DCC146-C5E0-404B-88AE-77197742693E
|
|
|
+
|
|
|
+ #include "___CONFIG/config_defaults.h" //A141F5180-09E3-4AE6-A1DE-9D5FC32A42FA
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #if defined(HAS_u8g2) //AA62F3878-788F-4BC2-97F7-E3104F4011AB
|
|
|
+ U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); //A324F7D85-AEF1-419D-90EA-08C27F70AEC5
|
|
|
+
|
|
|
+ //p5__display__class p5__display__class_A(u8g2,U8LOG_WIDTH, U8LOG_HEIGHT , u8log_buffer ) ;
|
|
|
+ //p5__display__class p5__display__class_A ;
|
|
|
+
|
|
|
+
|
|
|
+ #endif
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </xs:appinfo>
|
|
|
+ </xs:annotation>
|
|
|
+ </xs:element>
|
|
|
+ <xs:element name="setup" type="automation_driven.submodule.appinfo:insert__code">
|
|
|
+ <xs:annotation>
|
|
|
+ <xs:appinfo>
|
|
|
+ void setup(void) {
|
|
|
+ Serial.begin(115200);
|
|
|
+ Serial.println("SX");
|
|
|
+
|
|
|
+ Adafruit_PWMServoDriver P5__I2C__DEVICE__PWM = Adafruit_PWMServoDriver(0x40, Wire); //todo init somehow
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+//todo
|
|
|
+ // #include "___P5_LIB/p5__task__scan.h"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #if defined(HAS_u8g2)
|
|
|
+
|
|
|
+ #if defined(HAS_u8g2__ROTATED)
|
|
|
+ u8g2.setDisplayRotation(U8G2_R2);
|
|
|
+ u8g2.setAutoPageClear(1);
|
|
|
+ # elif defined( HAS_NOT_u8g2__ROTATED)
|
|
|
+ #else
|
|
|
+
|
|
|
+ #endif
|
|
|
+ u8g2.begin();
|
|
|
+
|
|
|
+ u8g2.clearBuffer();
|
|
|
+ u8g2.setFont(u8g2_font_amstrad_cpc_extended_8f//u8g2_font_tom_thumb_4x6_mf); // set the font for the terminal window
|
|
|
+ );
|
|
|
+ u8g2.drawStr(4,29," SX");
|
|
|
+ // u8g2.print ("SX");
|
|
|
+ u8g2.sendBuffer();
|
|
|
+
|
|
|
+ // u8g2log.print("\f TEST55 \n");
|
|
|
+ Serial.print(" SB ");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // p5__display__log__beg(u8g2log);
|
|
|
+ // u8g2log.print(" SB ");
|
|
|
+
|
|
|
+ // p5__display__log__last(u8g2log,1);
|
|
|
+
|
|
|
+ delay(2000);
|
|
|
+ #endif
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Serial.println("22");
|
|
|
+
|
|
|
+
|
|
|
+ p5__pins__setup();
|
|
|
+ Serial.print("33");
|
|
|
+ p5__config__individual__init(P5__TASK__CONFIG_A,P5__TASK__CONFIG__INDEX__CURRENT_A,P5__TASK__CONFIG__INDEX__CURRENT__EXEC_A , P5__TASK__ATTR_A,P5__TASK__ATTR__INDEX__CURRENT_A , P5__TASK__ATTR__INDEX__CURRENT__EXEC_A );
|
|
|
+ Serial.print("44");
|
|
|
+
|
|
|
+ }</xs:appinfo>
|
|
|
+ </xs:annotation>
|
|
|
+ </xs:element>
|
|
|
+ <xs:element name="main2" type="automation_driven.submodule.appinfo:insert__code">
|
|
|
+ <xs:annotation>
|
|
|
+ <xs:appinfo>
|
|
|
+
|
|
|
+ unsigned long t = 0;
|
|
|
+ unsigned long t_timestamp = 0;
|
|
|
+ P5__LATENCY_TIMESTAMP_T P5__LATENCY_TASK_EXEC_TIME_TIMESTAMP_A = 0;
|
|
|
+ </xs:appinfo>
|
|
|
+ </xs:annotation>
|
|
|
+ </xs:element>
|
|
|
+ <xs:element name="loop" type="automation_driven.submodule.appinfo:insert__code">
|
|
|
+ <xs:annotation>
|
|
|
+ <xs:appinfo>
|
|
|
+
|
|
|
+ void loop(void) {
|
|
|
+
|
|
|
+ #include "___P5_LIB/p5__task__loop.h" //controlled by p5__task__loop__exec.h
|
|
|
+ #include "___P5_LIB/p5__task__loop__exec.h"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if ( t < millis() ) {
|
|
|
+ t = millis() + 300000; // every 15 seconds
|
|
|
+ // p5__display__print(u8g2,u8g2log, "\f"); // \f = form feed: clear the screen
|
|
|
+
|
|
|
+ Serial.println(" T1 ");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ 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.print(" Ti");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //delay(50);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ </xs:appinfo>
|
|
|
+ </xs:annotation>
|
|
|
+ </xs:element>
|
|
|
</xs:schema>
|