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;