From a3583b68979e2420d940cb15aabe3462b11f27ba Mon Sep 17 00:00:00 2001 From: lenvm Date: Sun, 5 Nov 2023 23:16:49 +0100 Subject: [PATCH 1/8] add battery folder --- Software/Software.ino | 2 +- Software/{ => src/battery}/BATTERIES.h | 0 Software/{ => src/battery}/BMW-I3-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/BMW-I3-BATTERY.h | 4 ++-- Software/{ => src/battery}/CHADEMO-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/CHADEMO-BATTERY.h | 4 ++-- Software/{ => src/battery}/IMIEV-CZERO-ION-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/IMIEV-CZERO-ION-BATTERY.h | 4 ++-- Software/{ => src/battery}/KIA-HYUNDAI-64-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/KIA-HYUNDAI-64-BATTERY.h | 4 ++-- Software/{ => src/battery}/NISSAN-LEAF-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/NISSAN-LEAF-BATTERY.h | 4 ++-- Software/{ => src/battery}/RENAULT-ZOE-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/RENAULT-ZOE-BATTERY.h | 4 ++-- Software/{ => src/battery}/TESLA-MODEL-3-BATTERY.cpp | 4 ++-- Software/{ => src/battery}/TESLA-MODEL-3-BATTERY.h | 4 ++-- 16 files changed, 29 insertions(+), 29 deletions(-) rename Software/{ => src/battery}/BATTERIES.h (100%) rename Software/{ => src/battery}/BMW-I3-BATTERY.cpp (99%) rename Software/{ => src/battery}/BMW-I3-BATTERY.h (94%) rename Software/{ => src/battery}/CHADEMO-BATTERY.cpp (99%) rename Software/{ => src/battery}/CHADEMO-BATTERY.h (94%) rename Software/{ => src/battery}/IMIEV-CZERO-ION-BATTERY.cpp (99%) rename Software/{ => src/battery}/IMIEV-CZERO-ION-BATTERY.h (95%) rename Software/{ => src/battery}/KIA-HYUNDAI-64-BATTERY.cpp (98%) rename Software/{ => src/battery}/KIA-HYUNDAI-64-BATTERY.h (95%) rename Software/{ => src/battery}/NISSAN-LEAF-BATTERY.cpp (99%) rename Software/{ => src/battery}/NISSAN-LEAF-BATTERY.h (97%) rename Software/{ => src/battery}/RENAULT-ZOE-BATTERY.cpp (99%) rename Software/{ => src/battery}/RENAULT-ZOE-BATTERY.h (94%) rename Software/{ => src/battery}/TESLA-MODEL-3-BATTERY.cpp (99%) rename Software/{ => src/battery}/TESLA-MODEL-3-BATTERY.h (95%) diff --git a/Software/Software.ino b/Software/Software.ino index a9083df0..0ea1fd5d 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -11,7 +11,7 @@ #include "ESP32CAN.h" #include "CAN_config.h" #include "Adafruit_NeoPixel.h" -#include "BATTERIES.h" +#include "src/battery/BATTERIES.h" #include "INVERTERS.h" //CAN parameters diff --git a/Software/BATTERIES.h b/Software/src/battery/BATTERIES.h similarity index 100% rename from Software/BATTERIES.h rename to Software/src/battery/BATTERIES.h diff --git a/Software/BMW-I3-BATTERY.cpp b/Software/src/battery/BMW-I3-BATTERY.cpp similarity index 99% rename from Software/BMW-I3-BATTERY.cpp rename to Software/src/battery/BMW-I3-BATTERY.cpp index 95804658..2f8ddd8b 100644 --- a/Software/BMW-I3-BATTERY.cpp +++ b/Software/src/battery/BMW-I3-BATTERY.cpp @@ -1,6 +1,6 @@ #include "BMW-I3-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" //TODO before using // Map the final values in update_values_i3_battery, set some to static values if not available (current, discharge max , charge max) diff --git a/Software/BMW-I3-BATTERY.h b/Software/src/battery/BMW-I3-BATTERY.h similarity index 94% rename from Software/BMW-I3-BATTERY.h rename to Software/src/battery/BMW-I3-BATTERY.h index 7d42010f..c6b47163 100644 --- a/Software/BMW-I3-BATTERY.h +++ b/Software/src/battery/BMW-I3-BATTERY.h @@ -1,8 +1,8 @@ #ifndef BMW_I3_BATTERY_H #define BMW_I3_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 3100 // 310.0V if battery voltage goes under this, discharging further is disabled diff --git a/Software/CHADEMO-BATTERY.cpp b/Software/src/battery/CHADEMO-BATTERY.cpp similarity index 99% rename from Software/CHADEMO-BATTERY.cpp rename to Software/src/battery/CHADEMO-BATTERY.cpp index c9f0c373..9933d22a 100644 --- a/Software/CHADEMO-BATTERY.cpp +++ b/Software/src/battery/CHADEMO-BATTERY.cpp @@ -1,6 +1,6 @@ #include "CHADEMO-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis100 = 0; // will store last time a 100ms CAN Message was send diff --git a/Software/CHADEMO-BATTERY.h b/Software/src/battery/CHADEMO-BATTERY.h similarity index 94% rename from Software/CHADEMO-BATTERY.h rename to Software/src/battery/CHADEMO-BATTERY.h index e8a79205..5d330cd3 100644 --- a/Software/CHADEMO-BATTERY.h +++ b/Software/src/battery/CHADEMO-BATTERY.h @@ -1,8 +1,8 @@ #ifndef CHADEMO_BATTERY_H #define CHADEMO_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 3100 // 310.0V if battery voltage goes under this, discharging further is disabled diff --git a/Software/IMIEV-CZERO-ION-BATTERY.cpp b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp similarity index 99% rename from Software/IMIEV-CZERO-ION-BATTERY.cpp rename to Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp index c9a481c2..eed4cb3c 100644 --- a/Software/IMIEV-CZERO-ION-BATTERY.cpp +++ b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp @@ -1,6 +1,6 @@ #include "IMIEV-CZERO-ION-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" //Code still work in progress, TODO: //Figure out if CAN messages need to be sent to keep the system happy? diff --git a/Software/IMIEV-CZERO-ION-BATTERY.h b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.h similarity index 95% rename from Software/IMIEV-CZERO-ION-BATTERY.h rename to Software/src/battery/IMIEV-CZERO-ION-BATTERY.h index 6ef5f399..5cb356e7 100644 --- a/Software/IMIEV-CZERO-ION-BATTERY.h +++ b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.h @@ -1,8 +1,8 @@ #ifndef IMIEV_CZERO_ION_BATTERY_H #define IMIEV_CZERO_ION_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 3100 // 310.0V if battery voltage goes under this, discharging further is disabled diff --git a/Software/KIA-HYUNDAI-64-BATTERY.cpp b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp similarity index 98% rename from Software/KIA-HYUNDAI-64-BATTERY.cpp rename to Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp index 5ac5c353..b77fc8de 100644 --- a/Software/KIA-HYUNDAI-64-BATTERY.cpp +++ b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp @@ -1,6 +1,6 @@ #include "KIA-HYUNDAI-64-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was send diff --git a/Software/KIA-HYUNDAI-64-BATTERY.h b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.h similarity index 95% rename from Software/KIA-HYUNDAI-64-BATTERY.h rename to Software/src/battery/KIA-HYUNDAI-64-BATTERY.h index 3a610d25..052c6126 100644 --- a/Software/KIA-HYUNDAI-64-BATTERY.h +++ b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.h @@ -1,8 +1,8 @@ #ifndef KIA_HYUNDAI_64_BATTERY_H #define KIA_HYUNDAI_64_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 3100 // 310.0V if battery voltage goes under this, discharging further is disabled diff --git a/Software/NISSAN-LEAF-BATTERY.cpp b/Software/src/battery/NISSAN-LEAF-BATTERY.cpp similarity index 99% rename from Software/NISSAN-LEAF-BATTERY.cpp rename to Software/src/battery/NISSAN-LEAF-BATTERY.cpp index 34354087..04ca7ed4 100644 --- a/Software/NISSAN-LEAF-BATTERY.cpp +++ b/Software/src/battery/NISSAN-LEAF-BATTERY.cpp @@ -1,6 +1,6 @@ #include "NISSAN-LEAF-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was send diff --git a/Software/NISSAN-LEAF-BATTERY.h b/Software/src/battery/NISSAN-LEAF-BATTERY.h similarity index 97% rename from Software/NISSAN-LEAF-BATTERY.h rename to Software/src/battery/NISSAN-LEAF-BATTERY.h index 53fbb6db..e7eee7d1 100644 --- a/Software/NISSAN-LEAF-BATTERY.h +++ b/Software/src/battery/NISSAN-LEAF-BATTERY.h @@ -1,8 +1,8 @@ #ifndef NISSAN_LEAF_BATTERY_H #define NISSAN_LEAF_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 3100 // 310.0V if battery voltage goes under this, discharging further is disabled diff --git a/Software/RENAULT-ZOE-BATTERY.cpp b/Software/src/battery/RENAULT-ZOE-BATTERY.cpp similarity index 99% rename from Software/RENAULT-ZOE-BATTERY.cpp rename to Software/src/battery/RENAULT-ZOE-BATTERY.cpp index dfe953bb..9946e275 100644 --- a/Software/RENAULT-ZOE-BATTERY.cpp +++ b/Software/src/battery/RENAULT-ZOE-BATTERY.cpp @@ -1,6 +1,6 @@ #include "RENAULT-ZOE-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* Do not change code below unless you are sure what you are doing */ #define LB_MAX_SOC 1000 //BMS never goes over this value. We use this info to rescale SOC% sent to Fronius diff --git a/Software/RENAULT-ZOE-BATTERY.h b/Software/src/battery/RENAULT-ZOE-BATTERY.h similarity index 94% rename from Software/RENAULT-ZOE-BATTERY.h rename to Software/src/battery/RENAULT-ZOE-BATTERY.h index 483fb96d..3eb8d311 100644 --- a/Software/RENAULT-ZOE-BATTERY.h +++ b/Software/src/battery/RENAULT-ZOE-BATTERY.h @@ -1,8 +1,8 @@ #ifndef RENAULT_ZOE_BATTERY_H #define RENAULT_ZOE_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 3100 // 310.0V if battery voltage goes under this, discharging further is disabled diff --git a/Software/TESLA-MODEL-3-BATTERY.cpp b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp similarity index 99% rename from Software/TESLA-MODEL-3-BATTERY.cpp rename to Software/src/battery/TESLA-MODEL-3-BATTERY.cpp index 49acd267..fb5d5c9e 100644 --- a/Software/TESLA-MODEL-3-BATTERY.cpp +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp @@ -1,6 +1,6 @@ #include "TESLA-MODEL-3-BATTERY.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* Do not change code below unless you are sure what you are doing */ /* Credits: Most of the code comes from Per Carlen's bms_comms_tesla_model3.py (https://gitlab.com/pelle8/batt2gen24/) */ diff --git a/Software/TESLA-MODEL-3-BATTERY.h b/Software/src/battery/TESLA-MODEL-3-BATTERY.h similarity index 95% rename from Software/TESLA-MODEL-3-BATTERY.h rename to Software/src/battery/TESLA-MODEL-3-BATTERY.h index 3c680b19..e5ba3eb6 100644 --- a/Software/TESLA-MODEL-3-BATTERY.h +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.h @@ -1,8 +1,8 @@ #ifndef TESLA_MODEL_3_BATTERY_H #define TESLA_MODEL_3_BATTERY_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4030 // 403.0V,if battery voltage goes over this, charging is not possible (goes into forced discharge) #define ABSOLUTE_MIN_VOLTAGE 2450 // 245.0V if battery voltage goes under this, discharging further is disabled From fc0c71975d7cfac6c873f168e63f125d0589600b Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 00:18:48 +0100 Subject: [PATCH 2/8] add inverter folder --- Software/Software.ino | 2 +- Software/{ => src/inverter}/BYD-CAN.cpp | 4 ++-- Software/{ => src/inverter}/BYD-CAN.h | 4 ++-- Software/{ => src/inverter}/INVERTERS.h | 0 Software/{ => src/inverter}/MODBUS-BYD.cpp | 0 Software/{ => src/inverter}/MODBUS-BYD.h | 0 Software/{ => src/inverter}/MODBUS-LUNA2000.cpp | 0 Software/{ => src/inverter}/MODBUS-LUNA2000.h | 0 Software/{ => src/inverter}/PYLON-CAN.cpp | 4 ++-- Software/{ => src/inverter}/PYLON-CAN.h | 4 ++-- Software/{ => src/inverter}/SMA-CAN.cpp | 4 ++-- Software/{ => src/inverter}/SMA-CAN.h | 4 ++-- Software/{ => src/inverter}/SOFAR-CAN.cpp | 4 ++-- Software/{ => src/inverter}/SOFAR-CAN.h | 4 ++-- Software/{ => src/inverter}/SOLAX-CAN.cpp | 0 Software/{ => src/inverter}/SOLAX-CAN.h | 8 ++++---- 16 files changed, 21 insertions(+), 21 deletions(-) rename Software/{ => src/inverter}/BYD-CAN.cpp (99%) rename Software/{ => src/inverter}/BYD-CAN.h (93%) rename Software/{ => src/inverter}/INVERTERS.h (100%) rename Software/{ => src/inverter}/MODBUS-BYD.cpp (100%) rename Software/{ => src/inverter}/MODBUS-BYD.h (100%) rename Software/{ => src/inverter}/MODBUS-LUNA2000.cpp (100%) rename Software/{ => src/inverter}/MODBUS-LUNA2000.h (100%) rename Software/{ => src/inverter}/PYLON-CAN.cpp (99%) rename Software/{ => src/inverter}/PYLON-CAN.h (93%) rename Software/{ => src/inverter}/SMA-CAN.cpp (99%) rename Software/{ => src/inverter}/SMA-CAN.h (96%) rename Software/{ => src/inverter}/SOFAR-CAN.cpp (99%) rename Software/{ => src/inverter}/SOFAR-CAN.h (96%) rename Software/{ => src/inverter}/SOLAX-CAN.cpp (100%) rename Software/{ => src/inverter}/SOLAX-CAN.h (89%) diff --git a/Software/Software.ino b/Software/Software.ino index 0ea1fd5d..17856826 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -12,7 +12,7 @@ #include "CAN_config.h" #include "Adafruit_NeoPixel.h" #include "src/battery/BATTERIES.h" -#include "INVERTERS.h" +#include "src/inverter/INVERTERS.h" //CAN parameters CAN_device_t CAN_cfg; // CAN Config diff --git a/Software/BYD-CAN.cpp b/Software/src/inverter/BYD-CAN.cpp similarity index 99% rename from Software/BYD-CAN.cpp rename to Software/src/inverter/BYD-CAN.cpp index b5106f90..11ea1c93 100644 --- a/Software/BYD-CAN.cpp +++ b/Software/src/inverter/BYD-CAN.cpp @@ -1,6 +1,6 @@ #include "BYD-CAN.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis2s = 0; // will store last time a 2s CAN Message was send diff --git a/Software/BYD-CAN.h b/Software/src/inverter/BYD-CAN.h similarity index 93% rename from Software/BYD-CAN.h rename to Software/src/inverter/BYD-CAN.h index 0bbe1e93..c959ba29 100644 --- a/Software/BYD-CAN.h +++ b/Software/src/inverter/BYD-CAN.h @@ -1,8 +1,8 @@ #ifndef BYD_CAN_H #define BYD_CAN_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" extern uint16_t SOC; extern uint16_t StateOfHealth; diff --git a/Software/INVERTERS.h b/Software/src/inverter/INVERTERS.h similarity index 100% rename from Software/INVERTERS.h rename to Software/src/inverter/INVERTERS.h diff --git a/Software/MODBUS-BYD.cpp b/Software/src/inverter/MODBUS-BYD.cpp similarity index 100% rename from Software/MODBUS-BYD.cpp rename to Software/src/inverter/MODBUS-BYD.cpp diff --git a/Software/MODBUS-BYD.h b/Software/src/inverter/MODBUS-BYD.h similarity index 100% rename from Software/MODBUS-BYD.h rename to Software/src/inverter/MODBUS-BYD.h diff --git a/Software/MODBUS-LUNA2000.cpp b/Software/src/inverter/MODBUS-LUNA2000.cpp similarity index 100% rename from Software/MODBUS-LUNA2000.cpp rename to Software/src/inverter/MODBUS-LUNA2000.cpp diff --git a/Software/MODBUS-LUNA2000.h b/Software/src/inverter/MODBUS-LUNA2000.h similarity index 100% rename from Software/MODBUS-LUNA2000.h rename to Software/src/inverter/MODBUS-LUNA2000.h diff --git a/Software/PYLON-CAN.cpp b/Software/src/inverter/PYLON-CAN.cpp similarity index 99% rename from Software/PYLON-CAN.cpp rename to Software/src/inverter/PYLON-CAN.cpp index 499d5534..73476b4a 100644 --- a/Software/PYLON-CAN.cpp +++ b/Software/src/inverter/PYLON-CAN.cpp @@ -1,6 +1,6 @@ #include "PYLON-CAN.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" #define SEND_0 //If defined, the messages will have ID ending with 0 (useful for some inverters) //#define SEND_1 //If defined, the messages will have ID ending with 1 (useful for some inverters) diff --git a/Software/PYLON-CAN.h b/Software/src/inverter/PYLON-CAN.h similarity index 93% rename from Software/PYLON-CAN.h rename to Software/src/inverter/PYLON-CAN.h index 8e96de45..45b3ac1e 100644 --- a/Software/PYLON-CAN.h +++ b/Software/src/inverter/PYLON-CAN.h @@ -1,8 +1,8 @@ #ifndef PYLON_CAN_H #define PYLON_CAN_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" extern uint16_t SOC; extern uint16_t StateOfHealth; diff --git a/Software/SMA-CAN.cpp b/Software/src/inverter/SMA-CAN.cpp similarity index 99% rename from Software/SMA-CAN.cpp rename to Software/src/inverter/SMA-CAN.cpp index a5a15767..6ebf5501 100644 --- a/Software/SMA-CAN.cpp +++ b/Software/src/inverter/SMA-CAN.cpp @@ -1,6 +1,6 @@ #include "SMA-CAN.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" //TODO, change CAN sending routine once confirmed that 500ms interval is OK for this battery type diff --git a/Software/SMA-CAN.h b/Software/src/inverter/SMA-CAN.h similarity index 96% rename from Software/SMA-CAN.h rename to Software/src/inverter/SMA-CAN.h index 85f8dbac..b0e2e613 100644 --- a/Software/SMA-CAN.h +++ b/Software/src/inverter/SMA-CAN.h @@ -1,8 +1,8 @@ #ifndef SMA_CAN_H #define SMA_CAN_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) extern uint16_t StateOfHealth; //SOH%, 0-100.00 (0-10000) diff --git a/Software/SOFAR-CAN.cpp b/Software/src/inverter/SOFAR-CAN.cpp similarity index 99% rename from Software/SOFAR-CAN.cpp rename to Software/src/inverter/SOFAR-CAN.cpp index 1adcf542..4e88449d 100644 --- a/Software/SOFAR-CAN.cpp +++ b/Software/src/inverter/SOFAR-CAN.cpp @@ -1,6 +1,6 @@ #include "SOFAR-CAN.h" -#include "ESP32CAN.h" -#include "CAN_config.h" +#include "../../ESP32CAN.h" +#include "../../CAN_config.h" /* This implementation of the SOFAR can protocol is halfway done. What's missing is implementing the inverter replies, all the CAN messages are listed, but the can sending is missing. */ diff --git a/Software/SOFAR-CAN.h b/Software/src/inverter/SOFAR-CAN.h similarity index 96% rename from Software/SOFAR-CAN.h rename to Software/src/inverter/SOFAR-CAN.h index 3f57c54e..d0b2bb46 100644 --- a/Software/SOFAR-CAN.h +++ b/Software/src/inverter/SOFAR-CAN.h @@ -1,8 +1,8 @@ #ifndef SOFAR_CAN_H #define SOFAR_CAN_H #include -#include "ESP32CAN.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../USER_SETTINGS.h" // These parameters need to be mapped for the inverter extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) diff --git a/Software/SOLAX-CAN.cpp b/Software/src/inverter/SOLAX-CAN.cpp similarity index 100% rename from Software/SOLAX-CAN.cpp rename to Software/src/inverter/SOLAX-CAN.cpp diff --git a/Software/SOLAX-CAN.h b/Software/src/inverter/SOLAX-CAN.h similarity index 89% rename from Software/SOLAX-CAN.h rename to Software/src/inverter/SOLAX-CAN.h index fd62123a..333fb422 100644 --- a/Software/SOLAX-CAN.h +++ b/Software/src/inverter/SOLAX-CAN.h @@ -1,11 +1,11 @@ #ifndef SOLAX_CAN_H #define SOLAX_CAN_H #include -#include "ESP32CAN.h" -#include "config.h" -#include "USER_SETTINGS.h" +#include "../../ESP32CAN.h" +#include "../../config.h" +#include "../../USER_SETTINGS.h" -#include "ACAN2515.h" +#include "../../ACAN2515.h" extern ACAN2515 can; extern uint16_t SOC; From 2118ab4d75dc878b7f402680f253d77784996ddb Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 00:20:36 +0100 Subject: [PATCH 3/8] add lib/adafruit-Adafruit_NeoPixel --- Software/Software.ino | 2 +- .../lib/adafruit-Adafruit_NeoPixel}/Adafruit_NeoPixel.cpp | 0 .../lib/adafruit-Adafruit_NeoPixel}/Adafruit_NeoPixel.h | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename Software/{ => src/lib/adafruit-Adafruit_NeoPixel}/Adafruit_NeoPixel.cpp (100%) rename Software/{ => src/lib/adafruit-Adafruit_NeoPixel}/Adafruit_NeoPixel.h (100%) diff --git a/Software/Software.ino b/Software/Software.ino index 17856826..b1cb533b 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -10,7 +10,7 @@ #include "ModbusServerRTU.h" #include "ESP32CAN.h" #include "CAN_config.h" -#include "Adafruit_NeoPixel.h" +#include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" #include "src/battery/BATTERIES.h" #include "src/inverter/INVERTERS.h" diff --git a/Software/Adafruit_NeoPixel.cpp b/Software/src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.cpp similarity index 100% rename from Software/Adafruit_NeoPixel.cpp rename to Software/src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.cpp diff --git a/Software/Adafruit_NeoPixel.h b/Software/src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h similarity index 100% rename from Software/Adafruit_NeoPixel.h rename to Software/src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h From ead4b805e264eebe9c3fdceffef1ffdec018b1eb Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 00:26:28 +0100 Subject: [PATCH 4/8] add lib/ThomasBarth-ESP32-CAN-Driver --- Software/ESP32CAN.h | 4 ++-- Software/Software.ino | 2 +- Software/src/battery/BMW-I3-BATTERY.cpp | 2 +- Software/src/battery/CHADEMO-BATTERY.cpp | 2 +- Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp | 2 +- Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp | 2 +- Software/src/battery/NISSAN-LEAF-BATTERY.cpp | 2 +- Software/src/battery/RENAULT-ZOE-BATTERY.cpp | 2 +- Software/src/battery/TESLA-MODEL-3-BATTERY.cpp | 2 +- Software/src/inverter/BYD-CAN.cpp | 2 +- Software/src/inverter/PYLON-CAN.cpp | 2 +- Software/src/inverter/SMA-CAN.cpp | 2 +- Software/src/inverter/SOFAR-CAN.cpp | 2 +- Software/{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/CAN.c | 0 Software/{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/CAN.h | 0 .../{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/CAN_config.h | 0 .../{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/can_regdef.h | 0 17 files changed, 14 insertions(+), 14 deletions(-) rename Software/{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/CAN.c (100%) rename Software/{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/CAN.h (100%) rename Software/{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/CAN_config.h (100%) rename Software/{ => src/lib/ThomasBarth-ESP32-CAN-Driver}/can_regdef.h (100%) diff --git a/Software/ESP32CAN.h b/Software/ESP32CAN.h index 2cdde6bc..70e8ff3d 100644 --- a/Software/ESP32CAN.h +++ b/Software/ESP32CAN.h @@ -1,8 +1,8 @@ #ifndef ESP32CAN_H #define ESP32CAN_H -#include "CAN_config.h" -#include "CAN.h" +#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" +#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.h" extern uint8_t LEDcolor; class ESP32CAN diff --git a/Software/Software.ino b/Software/Software.ino index b1cb533b..9f9621db 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -9,7 +9,7 @@ #include "mbServerFCs.h" #include "ModbusServerRTU.h" #include "ESP32CAN.h" -#include "CAN_config.h" +#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" #include "src/battery/BATTERIES.h" #include "src/inverter/INVERTERS.h" diff --git a/Software/src/battery/BMW-I3-BATTERY.cpp b/Software/src/battery/BMW-I3-BATTERY.cpp index 2f8ddd8b..c4b9c278 100644 --- a/Software/src/battery/BMW-I3-BATTERY.cpp +++ b/Software/src/battery/BMW-I3-BATTERY.cpp @@ -1,6 +1,6 @@ #include "BMW-I3-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" //TODO before using // Map the final values in update_values_i3_battery, set some to static values if not available (current, discharge max , charge max) diff --git a/Software/src/battery/CHADEMO-BATTERY.cpp b/Software/src/battery/CHADEMO-BATTERY.cpp index 9933d22a..ce770e06 100644 --- a/Software/src/battery/CHADEMO-BATTERY.cpp +++ b/Software/src/battery/CHADEMO-BATTERY.cpp @@ -1,6 +1,6 @@ #include "CHADEMO-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis100 = 0; // will store last time a 100ms CAN Message was send diff --git a/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp index eed4cb3c..168e51b9 100644 --- a/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp +++ b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp @@ -1,6 +1,6 @@ #include "IMIEV-CZERO-ION-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" //Code still work in progress, TODO: //Figure out if CAN messages need to be sent to keep the system happy? diff --git a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp index b77fc8de..4af8cdac 100644 --- a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp +++ b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp @@ -1,6 +1,6 @@ #include "KIA-HYUNDAI-64-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was send diff --git a/Software/src/battery/NISSAN-LEAF-BATTERY.cpp b/Software/src/battery/NISSAN-LEAF-BATTERY.cpp index 04ca7ed4..95279217 100644 --- a/Software/src/battery/NISSAN-LEAF-BATTERY.cpp +++ b/Software/src/battery/NISSAN-LEAF-BATTERY.cpp @@ -1,6 +1,6 @@ #include "NISSAN-LEAF-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was send diff --git a/Software/src/battery/RENAULT-ZOE-BATTERY.cpp b/Software/src/battery/RENAULT-ZOE-BATTERY.cpp index 9946e275..36d32446 100644 --- a/Software/src/battery/RENAULT-ZOE-BATTERY.cpp +++ b/Software/src/battery/RENAULT-ZOE-BATTERY.cpp @@ -1,6 +1,6 @@ #include "RENAULT-ZOE-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ #define LB_MAX_SOC 1000 //BMS never goes over this value. We use this info to rescale SOC% sent to Fronius diff --git a/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp index fb5d5c9e..21dc21ff 100644 --- a/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp @@ -1,6 +1,6 @@ #include "TESLA-MODEL-3-BATTERY.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ /* Credits: Most of the code comes from Per Carlen's bms_comms_tesla_model3.py (https://gitlab.com/pelle8/batt2gen24/) */ diff --git a/Software/src/inverter/BYD-CAN.cpp b/Software/src/inverter/BYD-CAN.cpp index 11ea1c93..7c8cf292 100644 --- a/Software/src/inverter/BYD-CAN.cpp +++ b/Software/src/inverter/BYD-CAN.cpp @@ -1,6 +1,6 @@ #include "BYD-CAN.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ static unsigned long previousMillis2s = 0; // will store last time a 2s CAN Message was send diff --git a/Software/src/inverter/PYLON-CAN.cpp b/Software/src/inverter/PYLON-CAN.cpp index 73476b4a..b5f13082 100644 --- a/Software/src/inverter/PYLON-CAN.cpp +++ b/Software/src/inverter/PYLON-CAN.cpp @@ -1,6 +1,6 @@ #include "PYLON-CAN.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #define SEND_0 //If defined, the messages will have ID ending with 0 (useful for some inverters) //#define SEND_1 //If defined, the messages will have ID ending with 1 (useful for some inverters) diff --git a/Software/src/inverter/SMA-CAN.cpp b/Software/src/inverter/SMA-CAN.cpp index 6ebf5501..0f4d6eb4 100644 --- a/Software/src/inverter/SMA-CAN.cpp +++ b/Software/src/inverter/SMA-CAN.cpp @@ -1,6 +1,6 @@ #include "SMA-CAN.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" //TODO, change CAN sending routine once confirmed that 500ms interval is OK for this battery type diff --git a/Software/src/inverter/SOFAR-CAN.cpp b/Software/src/inverter/SOFAR-CAN.cpp index 4e88449d..a3a4c7f5 100644 --- a/Software/src/inverter/SOFAR-CAN.cpp +++ b/Software/src/inverter/SOFAR-CAN.cpp @@ -1,6 +1,6 @@ #include "SOFAR-CAN.h" #include "../../ESP32CAN.h" -#include "../../CAN_config.h" +#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* This implementation of the SOFAR can protocol is halfway done. What's missing is implementing the inverter replies, all the CAN messages are listed, but the can sending is missing. */ diff --git a/Software/CAN.c b/Software/src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.c similarity index 100% rename from Software/CAN.c rename to Software/src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.c diff --git a/Software/CAN.h b/Software/src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.h similarity index 100% rename from Software/CAN.h rename to Software/src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.h diff --git a/Software/CAN_config.h b/Software/src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h similarity index 100% rename from Software/CAN_config.h rename to Software/src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h diff --git a/Software/can_regdef.h b/Software/src/lib/ThomasBarth-ESP32-CAN-Driver/can_regdef.h similarity index 100% rename from Software/can_regdef.h rename to Software/src/lib/ThomasBarth-ESP32-CAN-Driver/can_regdef.h From 86decfbc51cbffd28b148db5eb888e7a32ece5ca Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 00:36:16 +0100 Subject: [PATCH 5/8] add lib/pierremolinaro-acan2515 --- Software/Software.ino | 2 +- Software/src/inverter/SOLAX-CAN.h | 2 +- Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515.cpp | 0 Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515.h | 0 .../{ => src/lib/pierremolinaro-acan2515}/ACAN2515Settings.cpp | 0 .../{ => src/lib/pierremolinaro-acan2515}/ACAN2515Settings.h | 0 .../{ => src/lib/pierremolinaro-acan2515}/ACAN2515_Buffer16.h | 0 Software/{ => src/lib/pierremolinaro-acan2515}/ACANBuffer.h | 0 Software/{ => src/lib/pierremolinaro-acan2515}/CANMessage.h | 0 .../lib/pierremolinaro-acan2515}/MCP2515ReceiveFilters.h | 0 10 files changed, 2 insertions(+), 2 deletions(-) rename Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515.cpp (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515.h (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515Settings.cpp (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515Settings.h (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/ACAN2515_Buffer16.h (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/ACANBuffer.h (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/CANMessage.h (100%) rename Software/{ => src/lib/pierremolinaro-acan2515}/MCP2515ReceiveFilters.h (100%) diff --git a/Software/Software.ino b/Software/Software.ino index 9f9621db..a3c36af1 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -19,7 +19,7 @@ CAN_device_t CAN_cfg; // CAN Config const int rx_queue_size = 10; // Receive Queue size #ifdef DUAL_CAN - #include "ACAN2515.h" + #include "src/lib/pierremolinaro-acan2515/ACAN2515.h" static const uint32_t QUARTZ_FREQUENCY = 8UL * 1000UL * 1000UL ; // 8 MHz ACAN2515 can(MCP2515_CS, SPI, MCP2515_INT); static ACAN2515_Buffer16 gBuffer; diff --git a/Software/src/inverter/SOLAX-CAN.h b/Software/src/inverter/SOLAX-CAN.h index 333fb422..8bbc6eb5 100644 --- a/Software/src/inverter/SOLAX-CAN.h +++ b/Software/src/inverter/SOLAX-CAN.h @@ -5,7 +5,7 @@ #include "../../config.h" #include "../../USER_SETTINGS.h" -#include "../../ACAN2515.h" +#include "../../src/lib/pierremolinaro-acan2515/ACAN2515.h" extern ACAN2515 can; extern uint16_t SOC; diff --git a/Software/ACAN2515.cpp b/Software/src/lib/pierremolinaro-acan2515/ACAN2515.cpp similarity index 100% rename from Software/ACAN2515.cpp rename to Software/src/lib/pierremolinaro-acan2515/ACAN2515.cpp diff --git a/Software/ACAN2515.h b/Software/src/lib/pierremolinaro-acan2515/ACAN2515.h similarity index 100% rename from Software/ACAN2515.h rename to Software/src/lib/pierremolinaro-acan2515/ACAN2515.h diff --git a/Software/ACAN2515Settings.cpp b/Software/src/lib/pierremolinaro-acan2515/ACAN2515Settings.cpp similarity index 100% rename from Software/ACAN2515Settings.cpp rename to Software/src/lib/pierremolinaro-acan2515/ACAN2515Settings.cpp diff --git a/Software/ACAN2515Settings.h b/Software/src/lib/pierremolinaro-acan2515/ACAN2515Settings.h similarity index 100% rename from Software/ACAN2515Settings.h rename to Software/src/lib/pierremolinaro-acan2515/ACAN2515Settings.h diff --git a/Software/ACAN2515_Buffer16.h b/Software/src/lib/pierremolinaro-acan2515/ACAN2515_Buffer16.h similarity index 100% rename from Software/ACAN2515_Buffer16.h rename to Software/src/lib/pierremolinaro-acan2515/ACAN2515_Buffer16.h diff --git a/Software/ACANBuffer.h b/Software/src/lib/pierremolinaro-acan2515/ACANBuffer.h similarity index 100% rename from Software/ACANBuffer.h rename to Software/src/lib/pierremolinaro-acan2515/ACANBuffer.h diff --git a/Software/CANMessage.h b/Software/src/lib/pierremolinaro-acan2515/CANMessage.h similarity index 100% rename from Software/CANMessage.h rename to Software/src/lib/pierremolinaro-acan2515/CANMessage.h diff --git a/Software/MCP2515ReceiveFilters.h b/Software/src/lib/pierremolinaro-acan2515/MCP2515ReceiveFilters.h similarity index 100% rename from Software/MCP2515ReceiveFilters.h rename to Software/src/lib/pierremolinaro-acan2515/MCP2515ReceiveFilters.h From 8a1d3c1da5f9c068b1c38385c6ba2f7205801b52 Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 00:48:38 +0100 Subject: [PATCH 6/8] add lib/eModbus-eModbus --- Software/Software.ino | 4 ++-- Software/mbServerFCs.cpp | 2 +- Software/mbServerFCs.h | 2 +- Software/{ => src/lib/eModbus-eModbus}/CoilData.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/CoilData.h | 0 Software/{ => src/lib/eModbus-eModbus}/Logging.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/Logging.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeEthernet.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeRTU.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeTemp.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeWiFi.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusClient.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusClient.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusClientRTU.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusClientRTU.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusError.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusMessage.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusMessage.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusServer.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusServer.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusServerEthernet.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusServerRTU.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusServerRTU.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusServerWiFi.h | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusTypeDefs.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/ModbusTypeDefs.h | 0 Software/{ => src/lib/eModbus-eModbus}/RTUutils.cpp | 0 Software/{ => src/lib/eModbus-eModbus}/RTUutils.h | 0 Software/{ => src/lib/eModbus-eModbus}/options.h | 0 29 files changed, 4 insertions(+), 4 deletions(-) rename Software/{ => src/lib/eModbus-eModbus}/CoilData.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/CoilData.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/Logging.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/Logging.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeEthernet.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeRTU.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeTemp.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusBridgeWiFi.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusClient.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusClient.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusClientRTU.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusClientRTU.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusError.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusMessage.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusMessage.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusServer.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusServer.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusServerEthernet.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusServerRTU.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusServerRTU.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusServerWiFi.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusTypeDefs.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/ModbusTypeDefs.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/RTUutils.cpp (100%) rename Software/{ => src/lib/eModbus-eModbus}/RTUutils.h (100%) rename Software/{ => src/lib/eModbus-eModbus}/options.h (100%) diff --git a/Software/Software.ino b/Software/Software.ino index a3c36af1..3b8db90a 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -5,9 +5,9 @@ #include "HardwareSerial.h" #include "USER_SETTINGS.h" #include "config.h" -#include "Logging.h" +#include "src/lib/eModbus-eModbus/Logging.h" #include "mbServerFCs.h" -#include "ModbusServerRTU.h" +#include "src/lib/eModbus-eModbus/ModbusServerRTU.h" #include "ESP32CAN.h" #include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" diff --git a/Software/mbServerFCs.cpp b/Software/mbServerFCs.cpp index 4925e946..d5c57267 100644 --- a/Software/mbServerFCs.cpp +++ b/Software/mbServerFCs.cpp @@ -1,5 +1,5 @@ #include "mbServerFCs.h" -#include "Logging.h" +#include "src/lib/eModbus-eModbus/Logging.h" //modbus register memory - declared in main.cpp diff --git a/Software/mbServerFCs.h b/Software/mbServerFCs.h index cd79fc39..e9212c60 100644 --- a/Software/mbServerFCs.h +++ b/Software/mbServerFCs.h @@ -1,4 +1,4 @@ -#include "ModbusServerRTU.h" +#include "src/lib/eModbus-eModbus/ModbusServerRTU.h" #define MBTCP_ID 21 // modbus TCP server ID #define MBPV_MAX 30000 diff --git a/Software/CoilData.cpp b/Software/src/lib/eModbus-eModbus/CoilData.cpp similarity index 100% rename from Software/CoilData.cpp rename to Software/src/lib/eModbus-eModbus/CoilData.cpp diff --git a/Software/CoilData.h b/Software/src/lib/eModbus-eModbus/CoilData.h similarity index 100% rename from Software/CoilData.h rename to Software/src/lib/eModbus-eModbus/CoilData.h diff --git a/Software/Logging.cpp b/Software/src/lib/eModbus-eModbus/Logging.cpp similarity index 100% rename from Software/Logging.cpp rename to Software/src/lib/eModbus-eModbus/Logging.cpp diff --git a/Software/Logging.h b/Software/src/lib/eModbus-eModbus/Logging.h similarity index 100% rename from Software/Logging.h rename to Software/src/lib/eModbus-eModbus/Logging.h diff --git a/Software/ModbusBridgeEthernet.h b/Software/src/lib/eModbus-eModbus/ModbusBridgeEthernet.h similarity index 100% rename from Software/ModbusBridgeEthernet.h rename to Software/src/lib/eModbus-eModbus/ModbusBridgeEthernet.h diff --git a/Software/ModbusBridgeRTU.h b/Software/src/lib/eModbus-eModbus/ModbusBridgeRTU.h similarity index 100% rename from Software/ModbusBridgeRTU.h rename to Software/src/lib/eModbus-eModbus/ModbusBridgeRTU.h diff --git a/Software/ModbusBridgeTemp.h b/Software/src/lib/eModbus-eModbus/ModbusBridgeTemp.h similarity index 100% rename from Software/ModbusBridgeTemp.h rename to Software/src/lib/eModbus-eModbus/ModbusBridgeTemp.h diff --git a/Software/ModbusBridgeWiFi.h b/Software/src/lib/eModbus-eModbus/ModbusBridgeWiFi.h similarity index 100% rename from Software/ModbusBridgeWiFi.h rename to Software/src/lib/eModbus-eModbus/ModbusBridgeWiFi.h diff --git a/Software/ModbusClient.cpp b/Software/src/lib/eModbus-eModbus/ModbusClient.cpp similarity index 100% rename from Software/ModbusClient.cpp rename to Software/src/lib/eModbus-eModbus/ModbusClient.cpp diff --git a/Software/ModbusClient.h b/Software/src/lib/eModbus-eModbus/ModbusClient.h similarity index 100% rename from Software/ModbusClient.h rename to Software/src/lib/eModbus-eModbus/ModbusClient.h diff --git a/Software/ModbusClientRTU.cpp b/Software/src/lib/eModbus-eModbus/ModbusClientRTU.cpp similarity index 100% rename from Software/ModbusClientRTU.cpp rename to Software/src/lib/eModbus-eModbus/ModbusClientRTU.cpp diff --git a/Software/ModbusClientRTU.h b/Software/src/lib/eModbus-eModbus/ModbusClientRTU.h similarity index 100% rename from Software/ModbusClientRTU.h rename to Software/src/lib/eModbus-eModbus/ModbusClientRTU.h diff --git a/Software/ModbusError.h b/Software/src/lib/eModbus-eModbus/ModbusError.h similarity index 100% rename from Software/ModbusError.h rename to Software/src/lib/eModbus-eModbus/ModbusError.h diff --git a/Software/ModbusMessage.cpp b/Software/src/lib/eModbus-eModbus/ModbusMessage.cpp similarity index 100% rename from Software/ModbusMessage.cpp rename to Software/src/lib/eModbus-eModbus/ModbusMessage.cpp diff --git a/Software/ModbusMessage.h b/Software/src/lib/eModbus-eModbus/ModbusMessage.h similarity index 100% rename from Software/ModbusMessage.h rename to Software/src/lib/eModbus-eModbus/ModbusMessage.h diff --git a/Software/ModbusServer.cpp b/Software/src/lib/eModbus-eModbus/ModbusServer.cpp similarity index 100% rename from Software/ModbusServer.cpp rename to Software/src/lib/eModbus-eModbus/ModbusServer.cpp diff --git a/Software/ModbusServer.h b/Software/src/lib/eModbus-eModbus/ModbusServer.h similarity index 100% rename from Software/ModbusServer.h rename to Software/src/lib/eModbus-eModbus/ModbusServer.h diff --git a/Software/ModbusServerEthernet.h b/Software/src/lib/eModbus-eModbus/ModbusServerEthernet.h similarity index 100% rename from Software/ModbusServerEthernet.h rename to Software/src/lib/eModbus-eModbus/ModbusServerEthernet.h diff --git a/Software/ModbusServerRTU.cpp b/Software/src/lib/eModbus-eModbus/ModbusServerRTU.cpp similarity index 100% rename from Software/ModbusServerRTU.cpp rename to Software/src/lib/eModbus-eModbus/ModbusServerRTU.cpp diff --git a/Software/ModbusServerRTU.h b/Software/src/lib/eModbus-eModbus/ModbusServerRTU.h similarity index 100% rename from Software/ModbusServerRTU.h rename to Software/src/lib/eModbus-eModbus/ModbusServerRTU.h diff --git a/Software/ModbusServerWiFi.h b/Software/src/lib/eModbus-eModbus/ModbusServerWiFi.h similarity index 100% rename from Software/ModbusServerWiFi.h rename to Software/src/lib/eModbus-eModbus/ModbusServerWiFi.h diff --git a/Software/ModbusTypeDefs.cpp b/Software/src/lib/eModbus-eModbus/ModbusTypeDefs.cpp similarity index 100% rename from Software/ModbusTypeDefs.cpp rename to Software/src/lib/eModbus-eModbus/ModbusTypeDefs.cpp diff --git a/Software/ModbusTypeDefs.h b/Software/src/lib/eModbus-eModbus/ModbusTypeDefs.h similarity index 100% rename from Software/ModbusTypeDefs.h rename to Software/src/lib/eModbus-eModbus/ModbusTypeDefs.h diff --git a/Software/RTUutils.cpp b/Software/src/lib/eModbus-eModbus/RTUutils.cpp similarity index 100% rename from Software/RTUutils.cpp rename to Software/src/lib/eModbus-eModbus/RTUutils.cpp diff --git a/Software/RTUutils.h b/Software/src/lib/eModbus-eModbus/RTUutils.h similarity index 100% rename from Software/RTUutils.h rename to Software/src/lib/eModbus-eModbus/RTUutils.h diff --git a/Software/options.h b/Software/src/lib/eModbus-eModbus/options.h similarity index 100% rename from Software/options.h rename to Software/src/lib/eModbus-eModbus/options.h From 606f49d54852008da4f4ac79d5c387feb05a43fc Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 00:58:17 +0100 Subject: [PATCH 7/8] add devboard folder --- Software/Software.ino | 6 +++--- Software/src/battery/BMW-I3-BATTERY.cpp | 2 +- Software/src/battery/BMW-I3-BATTERY.h | 2 +- Software/src/battery/CHADEMO-BATTERY.cpp | 2 +- Software/src/battery/CHADEMO-BATTERY.h | 2 +- Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp | 2 +- Software/src/battery/IMIEV-CZERO-ION-BATTERY.h | 2 +- Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp | 2 +- Software/src/battery/KIA-HYUNDAI-64-BATTERY.h | 2 +- Software/src/battery/NISSAN-LEAF-BATTERY.cpp | 2 +- Software/src/battery/NISSAN-LEAF-BATTERY.h | 2 +- Software/src/battery/RENAULT-ZOE-BATTERY.cpp | 2 +- Software/src/battery/RENAULT-ZOE-BATTERY.h | 2 +- Software/src/battery/TESLA-MODEL-3-BATTERY.cpp | 2 +- Software/src/battery/TESLA-MODEL-3-BATTERY.h | 2 +- Software/{ => src/devboard/can}/ESP32CAN.cpp | 0 Software/{ => src/devboard/can}/ESP32CAN.h | 4 ++-- Software/{ => src/devboard}/config.h | 0 Software/{ => src/devboard/debug}/debug.cfg | 0 Software/{ => src/devboard/debug}/debug_custom.json | 0 Software/{ => src/devboard}/esp.c | 0 Software/{ => src/devboard}/esp32.svd | 0 Software/{ => src/devboard/modbus}/mbServerFCs.cpp | 2 +- Software/{ => src/devboard/modbus}/mbServerFCs.h | 2 +- Software/src/inverter/BYD-CAN.cpp | 2 +- Software/src/inverter/BYD-CAN.h | 2 +- Software/src/inverter/PYLON-CAN.cpp | 2 +- Software/src/inverter/PYLON-CAN.h | 2 +- Software/src/inverter/SMA-CAN.cpp | 2 +- Software/src/inverter/SMA-CAN.h | 2 +- Software/src/inverter/SOFAR-CAN.cpp | 2 +- Software/src/inverter/SOFAR-CAN.h | 2 +- Software/src/inverter/SOLAX-CAN.h | 6 +++--- 33 files changed, 32 insertions(+), 32 deletions(-) rename Software/{ => src/devboard/can}/ESP32CAN.cpp (100%) rename Software/{ => src/devboard/can}/ESP32CAN.h (75%) rename Software/{ => src/devboard}/config.h (100%) rename Software/{ => src/devboard/debug}/debug.cfg (100%) rename Software/{ => src/devboard/debug}/debug_custom.json (100%) rename Software/{ => src/devboard}/esp.c (100%) rename Software/{ => src/devboard}/esp32.svd (100%) rename Software/{ => src/devboard/modbus}/mbServerFCs.cpp (96%) rename Software/{ => src/devboard/modbus}/mbServerFCs.h (78%) diff --git a/Software/Software.ino b/Software/Software.ino index 3b8db90a..57ae51b3 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -4,11 +4,11 @@ #include #include "HardwareSerial.h" #include "USER_SETTINGS.h" -#include "config.h" +#include "src/devboard/config.h" #include "src/lib/eModbus-eModbus/Logging.h" -#include "mbServerFCs.h" +#include "src/devboard/modbus/mbServerFCs.h" #include "src/lib/eModbus-eModbus/ModbusServerRTU.h" -#include "ESP32CAN.h" +#include "src/devboard/can/ESP32CAN.h" #include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" #include "src/battery/BATTERIES.h" diff --git a/Software/src/battery/BMW-I3-BATTERY.cpp b/Software/src/battery/BMW-I3-BATTERY.cpp index c4b9c278..7c762bf6 100644 --- a/Software/src/battery/BMW-I3-BATTERY.cpp +++ b/Software/src/battery/BMW-I3-BATTERY.cpp @@ -1,5 +1,5 @@ #include "BMW-I3-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" //TODO before using diff --git a/Software/src/battery/BMW-I3-BATTERY.h b/Software/src/battery/BMW-I3-BATTERY.h index c6b47163..4aac9be2 100644 --- a/Software/src/battery/BMW-I3-BATTERY.h +++ b/Software/src/battery/BMW-I3-BATTERY.h @@ -1,7 +1,7 @@ #ifndef BMW_I3_BATTERY_H #define BMW_I3_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/src/battery/CHADEMO-BATTERY.cpp b/Software/src/battery/CHADEMO-BATTERY.cpp index ce770e06..ac907d67 100644 --- a/Software/src/battery/CHADEMO-BATTERY.cpp +++ b/Software/src/battery/CHADEMO-BATTERY.cpp @@ -1,5 +1,5 @@ #include "CHADEMO-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ diff --git a/Software/src/battery/CHADEMO-BATTERY.h b/Software/src/battery/CHADEMO-BATTERY.h index 5d330cd3..58489325 100644 --- a/Software/src/battery/CHADEMO-BATTERY.h +++ b/Software/src/battery/CHADEMO-BATTERY.h @@ -1,7 +1,7 @@ #ifndef CHADEMO_BATTERY_H #define CHADEMO_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp index 168e51b9..7953547b 100644 --- a/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp +++ b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.cpp @@ -1,5 +1,5 @@ #include "IMIEV-CZERO-ION-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" //Code still work in progress, TODO: diff --git a/Software/src/battery/IMIEV-CZERO-ION-BATTERY.h b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.h index 5cb356e7..1c175974 100644 --- a/Software/src/battery/IMIEV-CZERO-ION-BATTERY.h +++ b/Software/src/battery/IMIEV-CZERO-ION-BATTERY.h @@ -1,7 +1,7 @@ #ifndef IMIEV_CZERO_ION_BATTERY_H #define IMIEV_CZERO_ION_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp index 4af8cdac..43b5845f 100644 --- a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp +++ b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.cpp @@ -1,5 +1,5 @@ #include "KIA-HYUNDAI-64-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ diff --git a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.h b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.h index 052c6126..b604c0bb 100644 --- a/Software/src/battery/KIA-HYUNDAI-64-BATTERY.h +++ b/Software/src/battery/KIA-HYUNDAI-64-BATTERY.h @@ -1,7 +1,7 @@ #ifndef KIA_HYUNDAI_64_BATTERY_H #define KIA_HYUNDAI_64_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/src/battery/NISSAN-LEAF-BATTERY.cpp b/Software/src/battery/NISSAN-LEAF-BATTERY.cpp index 95279217..a3248ed6 100644 --- a/Software/src/battery/NISSAN-LEAF-BATTERY.cpp +++ b/Software/src/battery/NISSAN-LEAF-BATTERY.cpp @@ -1,5 +1,5 @@ #include "NISSAN-LEAF-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ diff --git a/Software/src/battery/NISSAN-LEAF-BATTERY.h b/Software/src/battery/NISSAN-LEAF-BATTERY.h index e7eee7d1..8840b3ee 100644 --- a/Software/src/battery/NISSAN-LEAF-BATTERY.h +++ b/Software/src/battery/NISSAN-LEAF-BATTERY.h @@ -1,7 +1,7 @@ #ifndef NISSAN_LEAF_BATTERY_H #define NISSAN_LEAF_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/src/battery/RENAULT-ZOE-BATTERY.cpp b/Software/src/battery/RENAULT-ZOE-BATTERY.cpp index 36d32446..6f9d6225 100644 --- a/Software/src/battery/RENAULT-ZOE-BATTERY.cpp +++ b/Software/src/battery/RENAULT-ZOE-BATTERY.cpp @@ -1,5 +1,5 @@ #include "RENAULT-ZOE-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ diff --git a/Software/src/battery/RENAULT-ZOE-BATTERY.h b/Software/src/battery/RENAULT-ZOE-BATTERY.h index 3eb8d311..7061b795 100644 --- a/Software/src/battery/RENAULT-ZOE-BATTERY.h +++ b/Software/src/battery/RENAULT-ZOE-BATTERY.h @@ -1,7 +1,7 @@ #ifndef RENAULT_ZOE_BATTERY_H #define RENAULT_ZOE_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp index 21dc21ff..2c1357db 100644 --- a/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.cpp @@ -1,5 +1,5 @@ #include "TESLA-MODEL-3-BATTERY.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ diff --git a/Software/src/battery/TESLA-MODEL-3-BATTERY.h b/Software/src/battery/TESLA-MODEL-3-BATTERY.h index e5ba3eb6..d7056beb 100644 --- a/Software/src/battery/TESLA-MODEL-3-BATTERY.h +++ b/Software/src/battery/TESLA-MODEL-3-BATTERY.h @@ -1,7 +1,7 @@ #ifndef TESLA_MODEL_3_BATTERY_H #define TESLA_MODEL_3_BATTERY_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" #define ABSOLUTE_MAX_VOLTAGE 4030 // 403.0V,if battery voltage goes over this, charging is not possible (goes into forced discharge) diff --git a/Software/ESP32CAN.cpp b/Software/src/devboard/can/ESP32CAN.cpp similarity index 100% rename from Software/ESP32CAN.cpp rename to Software/src/devboard/can/ESP32CAN.cpp diff --git a/Software/ESP32CAN.h b/Software/src/devboard/can/ESP32CAN.h similarity index 75% rename from Software/ESP32CAN.h rename to Software/src/devboard/can/ESP32CAN.h index 70e8ff3d..4aecac83 100644 --- a/Software/ESP32CAN.h +++ b/Software/src/devboard/can/ESP32CAN.h @@ -1,8 +1,8 @@ #ifndef ESP32CAN_H #define ESP32CAN_H -#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" -#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.h" +#include "../../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" +#include "../../lib/ThomasBarth-ESP32-CAN-Driver/CAN.h" extern uint8_t LEDcolor; class ESP32CAN diff --git a/Software/config.h b/Software/src/devboard/config.h similarity index 100% rename from Software/config.h rename to Software/src/devboard/config.h diff --git a/Software/debug.cfg b/Software/src/devboard/debug/debug.cfg similarity index 100% rename from Software/debug.cfg rename to Software/src/devboard/debug/debug.cfg diff --git a/Software/debug_custom.json b/Software/src/devboard/debug/debug_custom.json similarity index 100% rename from Software/debug_custom.json rename to Software/src/devboard/debug/debug_custom.json diff --git a/Software/esp.c b/Software/src/devboard/esp.c similarity index 100% rename from Software/esp.c rename to Software/src/devboard/esp.c diff --git a/Software/esp32.svd b/Software/src/devboard/esp32.svd similarity index 100% rename from Software/esp32.svd rename to Software/src/devboard/esp32.svd diff --git a/Software/mbServerFCs.cpp b/Software/src/devboard/modbus/mbServerFCs.cpp similarity index 96% rename from Software/mbServerFCs.cpp rename to Software/src/devboard/modbus/mbServerFCs.cpp index d5c57267..97f7753b 100644 --- a/Software/mbServerFCs.cpp +++ b/Software/src/devboard/modbus/mbServerFCs.cpp @@ -1,5 +1,5 @@ #include "mbServerFCs.h" -#include "src/lib/eModbus-eModbus/Logging.h" +#include "../../lib/eModbus-eModbus/Logging.h" //modbus register memory - declared in main.cpp diff --git a/Software/mbServerFCs.h b/Software/src/devboard/modbus/mbServerFCs.h similarity index 78% rename from Software/mbServerFCs.h rename to Software/src/devboard/modbus/mbServerFCs.h index e9212c60..a56b97b1 100644 --- a/Software/mbServerFCs.h +++ b/Software/src/devboard/modbus/mbServerFCs.h @@ -1,4 +1,4 @@ -#include "src/lib/eModbus-eModbus/ModbusServerRTU.h" +#include "../../lib/eModbus-eModbus/ModbusServerRTU.h" #define MBTCP_ID 21 // modbus TCP server ID #define MBPV_MAX 30000 diff --git a/Software/src/inverter/BYD-CAN.cpp b/Software/src/inverter/BYD-CAN.cpp index 7c8cf292..e40503d3 100644 --- a/Software/src/inverter/BYD-CAN.cpp +++ b/Software/src/inverter/BYD-CAN.cpp @@ -1,5 +1,5 @@ #include "BYD-CAN.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* Do not change code below unless you are sure what you are doing */ diff --git a/Software/src/inverter/BYD-CAN.h b/Software/src/inverter/BYD-CAN.h index c959ba29..0d7506d7 100644 --- a/Software/src/inverter/BYD-CAN.h +++ b/Software/src/inverter/BYD-CAN.h @@ -1,7 +1,7 @@ #ifndef BYD_CAN_H #define BYD_CAN_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" extern uint16_t SOC; diff --git a/Software/src/inverter/PYLON-CAN.cpp b/Software/src/inverter/PYLON-CAN.cpp index b5f13082..cb91da57 100644 --- a/Software/src/inverter/PYLON-CAN.cpp +++ b/Software/src/inverter/PYLON-CAN.cpp @@ -1,5 +1,5 @@ #include "PYLON-CAN.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #define SEND_0 //If defined, the messages will have ID ending with 0 (useful for some inverters) diff --git a/Software/src/inverter/PYLON-CAN.h b/Software/src/inverter/PYLON-CAN.h index 45b3ac1e..63af29f5 100644 --- a/Software/src/inverter/PYLON-CAN.h +++ b/Software/src/inverter/PYLON-CAN.h @@ -1,7 +1,7 @@ #ifndef PYLON_CAN_H #define PYLON_CAN_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" extern uint16_t SOC; diff --git a/Software/src/inverter/SMA-CAN.cpp b/Software/src/inverter/SMA-CAN.cpp index 0f4d6eb4..8705eceb 100644 --- a/Software/src/inverter/SMA-CAN.cpp +++ b/Software/src/inverter/SMA-CAN.cpp @@ -1,5 +1,5 @@ #include "SMA-CAN.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" //TODO, change CAN sending routine once confirmed that 500ms interval is OK for this battery type diff --git a/Software/src/inverter/SMA-CAN.h b/Software/src/inverter/SMA-CAN.h index b0e2e613..d501e6b7 100644 --- a/Software/src/inverter/SMA-CAN.h +++ b/Software/src/inverter/SMA-CAN.h @@ -1,7 +1,7 @@ #ifndef SMA_CAN_H #define SMA_CAN_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) diff --git a/Software/src/inverter/SOFAR-CAN.cpp b/Software/src/inverter/SOFAR-CAN.cpp index a3a4c7f5..33e72178 100644 --- a/Software/src/inverter/SOFAR-CAN.cpp +++ b/Software/src/inverter/SOFAR-CAN.cpp @@ -1,5 +1,5 @@ #include "SOFAR-CAN.h" -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" /* This implementation of the SOFAR can protocol is halfway done. What's missing is implementing the inverter replies, all the CAN messages are listed, but the can sending is missing. */ diff --git a/Software/src/inverter/SOFAR-CAN.h b/Software/src/inverter/SOFAR-CAN.h index d0b2bb46..288f4b81 100644 --- a/Software/src/inverter/SOFAR-CAN.h +++ b/Software/src/inverter/SOFAR-CAN.h @@ -1,7 +1,7 @@ #ifndef SOFAR_CAN_H #define SOFAR_CAN_H #include -#include "../../ESP32CAN.h" +#include "../devboard/can/ESP32CAN.h" #include "../../USER_SETTINGS.h" // These parameters need to be mapped for the inverter diff --git a/Software/src/inverter/SOLAX-CAN.h b/Software/src/inverter/SOLAX-CAN.h index 8bbc6eb5..05eb5732 100644 --- a/Software/src/inverter/SOLAX-CAN.h +++ b/Software/src/inverter/SOLAX-CAN.h @@ -1,11 +1,11 @@ #ifndef SOLAX_CAN_H #define SOLAX_CAN_H #include -#include "../../ESP32CAN.h" -#include "../../config.h" +#include "../devboard/can/ESP32CAN.h" +#include "../devboard/config.h" #include "../../USER_SETTINGS.h" -#include "../../src/lib/pierremolinaro-acan2515/ACAN2515.h" +#include "../lib/pierremolinaro-acan2515/ACAN2515.h" extern ACAN2515 can; extern uint16_t SOC; From 3d0a1c41851b10ce8598ea7e5a31c57ce4190455 Mon Sep 17 00:00:00 2001 From: lenvm Date: Mon, 6 Nov 2023 01:17:43 +0100 Subject: [PATCH 8/8] reorder includes --- Software/Software.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Software/Software.ino b/Software/Software.ino index 57ae51b3..f78976ef 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -3,14 +3,14 @@ #include #include "HardwareSerial.h" +#include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" +#include "src/lib/eModbus-eModbus/Logging.h" +#include "src/lib/eModbus-eModbus/ModbusServerRTU.h" +#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "USER_SETTINGS.h" #include "src/devboard/config.h" -#include "src/lib/eModbus-eModbus/Logging.h" #include "src/devboard/modbus/mbServerFCs.h" -#include "src/lib/eModbus-eModbus/ModbusServerRTU.h" #include "src/devboard/can/ESP32CAN.h" -#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" -#include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" #include "src/battery/BATTERIES.h" #include "src/inverter/INVERTERS.h"