|
@@ -96,6 +96,7 @@
|
|
|
#include "__main_struct_funct.h"
|
|
#include "__main_struct_funct.h"
|
|
|
#include "__main_struct_limits.h"
|
|
#include "__main_struct_limits.h"
|
|
|
#include "_time_struct.h"
|
|
#include "_time_struct.h"
|
|
|
|
|
+#include "_DRIVER_STATUS/_DRIVER_STATUS_struct.h"
|
|
|
|
|
|
|
|
#include "__main_I2C_struc.h"
|
|
#include "__main_I2C_struc.h"
|
|
|
#include "__main_static.h"
|
|
#include "__main_static.h"
|
|
@@ -117,6 +118,22 @@
|
|
|
//#include "config_Slave_Ports_LOCAL_0x101_init.h" //there kleep config of this id device
|
|
//#include "config_Slave_Ports_LOCAL_0x101_init.h" //there kleep config of this id device
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+#ifdef DEBUG
|
|
|
|
|
+#define DPRINT(...) Serial.print(__VA_ARGS__)
|
|
|
|
|
+#define DPRINTLN(...) Serial.println(__VA_ARGS__)
|
|
|
|
|
+#define DRINTF(...) Serial.print(F(__VA_ARGS__))
|
|
|
|
|
+#define DPRINTLNF(...) Serial.println(F(__VA_ARGS__))
|
|
|
|
|
+ DPRINTLN("#125 [DEBUG ENABLED]");
|
|
|
|
|
+ //DPRINTLN(0xC0FFEEul,DEC);
|
|
|
|
|
+ //DPRINTLN(12648430ul,HEX);
|
|
|
|
|
+#else
|
|
|
|
|
+#define DPRINT(...) //blank line
|
|
|
|
|
+#define DPRINTLN(...) //blank line
|
|
|
|
|
+#define DPRINTF(...) //blank line
|
|
|
|
|
+#define DPRINTLNF(...) //blank line
|
|
|
|
|
+
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
#if Active_ControllerID == 0x101
|
|
#if Active_ControllerID == 0x101
|
|
|
#include "___CONFIG/0x101/config_Active_ControllerID_0x101.h"
|
|
#include "___CONFIG/0x101/config_Active_ControllerID_0x101.h"
|
|
|
#endif
|
|
#endif
|
|
@@ -141,21 +158,21 @@
|
|
|
//#include "Slave_Ports_Status_QUEUE.h"
|
|
//#include "Slave_Ports_Status_QUEUE.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
-#include "_I2C_driver_Adafruit_PWMServoDriver_struct.h"
|
|
|
|
|
|
|
+#include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_struct.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_ROTTARY_SW)
|
|
#if defined(HAS_ROTTARY_SW)
|
|
|
- #include "_ROTTARY_SW_config.h"
|
|
|
|
|
|
|
+ #include "_ROTTARY_SW/_ROTTARY_SW_config.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
|
- #include "_I2C_driver_Adafruit_PWMServoDriver_config.h"
|
|
|
|
|
|
|
+ #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_config.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAS_ROTTARY_SW)
|
|
#if defined(HAS_ROTTARY_SW)
|
|
|
- #include "_ROTTARY_SW_struct.h"
|
|
|
|
|
|
|
+ #include "_ROTTARY_SW/_ROTTARY_SW_struct.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#include "Queue.h"
|
|
#include "Queue.h"
|
|
@@ -189,7 +206,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS__PCINT_setup)
|
|
#if defined(HAS__PCINT_setup)
|
|
|
- #include "_PCINT_struct.h"
|
|
|
|
|
|
|
+ #include "_PCINT/_PCINT_struct.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@@ -219,7 +236,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
|
- #include "_I2C_driver_Adafruit_PWMServoDriver_func.h"
|
|
|
|
|
|
|
+ #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_func.h"
|
|
|
#endif
|
|
#endif
|
|
|
#include "_TASK_TYPES_func.h"
|
|
#include "_TASK_TYPES_func.h"
|
|
|
#include "_Slave_Ports_Status_QUEUE_add_func.h"
|
|
#include "_Slave_Ports_Status_QUEUE_add_func.h"
|
|
@@ -236,7 +253,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_ROTTARY_SW)
|
|
#if defined(HAS_ROTTARY_SW)
|
|
|
- #include "_ROTTARY_SW_func.h"
|
|
|
|
|
|
|
+ #include "_ROTTARY_SW/_ROTTARY_SW_func.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#include "_time_func.h"
|
|
#include "_time_func.h"
|
|
@@ -281,13 +298,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_ROTTARY_SW)
|
|
#if defined(HAS_ROTTARY_SW)
|
|
|
- #include "_ROTTARY_SW_init.h"
|
|
|
|
|
|
|
+ #include "_ROTTARY_SW/_ROTTARY_SW_init.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS__PCINT_setup)
|
|
#if defined(HAS__PCINT_setup)
|
|
|
- #include "_PCINT_init.h"
|
|
|
|
|
|
|
+ #include "_PCINT/_PCINT_init.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#include "___CONFIG/config_Slave_Ports_LOCAL_init.h"
|
|
#include "___CONFIG/config_Slave_Ports_LOCAL_init.h"
|
|
@@ -304,7 +321,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
|
- #include "_I2C_driver_Adafruit_PWMServoDriver_init.h"
|
|
|
|
|
|
|
+ #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_init.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@@ -324,6 +341,12 @@
|
|
|
|
|
|
|
|
void setup() {
|
|
void setup() {
|
|
|
Serial.begin(115200);
|
|
Serial.begin(115200);
|
|
|
|
|
+
|
|
|
|
|
+#ifdef DISABLE_LOOP || DEBUG
|
|
|
|
|
+ Serial.println("#329 Serial.begin(115200)");
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// Serial.begin(9600);
|
|
// Serial.begin(9600);
|
|
|
// Serial.println("#233 setup" );
|
|
// Serial.println("#233 setup" );
|
|
|
// _LCD_print_queue.push(1);
|
|
// _LCD_print_queue.push(1);
|
|
@@ -341,13 +364,16 @@ void setup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
//todo PCINT service
|
|
//todo PCINT service
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#if defined(HAS__PCINT_setup)
|
|
#if defined(HAS__PCINT_setup)
|
|
|
- #include "_PCINT_setup.h"
|
|
|
|
|
|
|
+ #include "_PCINT/_PCINT_setup.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_ROTTARY_SW)
|
|
#if defined(HAS_ROTTARY_SW)
|
|
|
- #include "_ROTTARY_SW_setup.h"
|
|
|
|
|
|
|
+ #include "_ROTTARY_SW/_ROTTARY_SW_setup.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@@ -359,7 +385,7 @@ void setup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
#if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
|
|
|
- #include "_I2C_driver_Adafruit_PWMServoDriver_setup.h"
|
|
|
|
|
|
|
+ #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_setup.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
// put your setup code here, to run once:
|
|
// put your setup code here, to run once:
|
|
@@ -409,16 +435,18 @@ void setup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
void loop() {
|
|
void loop() {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#include "___loop/___loop_init.h"
|
|
#include "___loop/___loop_init.h"
|
|
|
|
|
|
|
|
#if defined(HAS__PCINT_setup)
|
|
#if defined(HAS__PCINT_setup)
|
|
|
- #include "_PCINT_loop.h"
|
|
|
|
|
|
|
+ #include "_PCINT/_PCINT_loop.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAS_ROTTARY_SW)
|
|
#if defined(HAS_ROTTARY_SW)
|
|
|
- #include "_ROTTARY_SW_loop.h"
|
|
|
|
|
|
|
+ #include "_ROTTARY_SW/_ROTTARY_SW_loop.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@@ -427,7 +455,7 @@ void loop() {
|
|
|
#ifdef DISABLE_LOOP
|
|
#ifdef DISABLE_LOOP
|
|
|
#include "___DEBUG/___DEBUG_DISABLE_LOOP.h"
|
|
#include "___DEBUG/___DEBUG_DISABLE_LOOP.h"
|
|
|
#endif
|
|
#endif
|
|
|
- #include "__main_loop_top.h"
|
|
|
|
|
|
|
+ #include "___loop/__main_loop_top.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A <= ARDUINO_LOOP_LATENCY_COUNTER_INIT ) {
|
|
if(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A <= ARDUINO_LOOP_LATENCY_COUNTER_INIT ) {
|
|
@@ -468,7 +496,7 @@ void loop() {
|
|
|
#include "_SlaveID_loop1.h" //todo PCINT
|
|
#include "_SlaveID_loop1.h" //todo PCINT
|
|
|
#include "_ControllerID_loop1.h" //todo make default
|
|
#include "_ControllerID_loop1.h" //todo make default
|
|
|
|
|
|
|
|
- #include "__main_loop_end.h"
|
|
|
|
|
|
|
+ #include "___loop/__main_loop_end.h"
|
|
|
// DISPLAY_DEV.setCursor(10,10);
|
|
// DISPLAY_DEV.setCursor(10,10);
|
|
|
// DISPLAY_DEV.print(" Test307");
|
|
// DISPLAY_DEV.print(" Test307");
|
|
|
/*
|
|
/*
|
|
@@ -486,5 +514,5 @@ void loop() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-#include "_PCINT_func_loop.h" //todo empty implement display etc
|
|
|
|
|
|
|
+#include "_PCINT/_PCINT_func_loop.h" //todo empty implement display etc
|
|
|
#include "_Slave_Ports_func_loop.h" //todo implement
|
|
#include "_Slave_Ports_func_loop.h" //todo implement
|