update name of ESP32 CAN library from ThomasBarth-ESP32-CAN-Driver to miwagner-ESP32-Arduino-CAN

- this change is implemented as the README.md file states that the miwagner/ESP32-Arduino-CAN is used in a slightly modified form
This commit is contained in:
lenvm 2023-11-11 13:41:04 +01:00
parent 1ae7d51ea9
commit e1c84e32f4
30 changed files with 39 additions and 39 deletions

View file

@ -5,14 +5,14 @@
#include "HardwareSerial.h" #include "HardwareSerial.h"
#include "USER_SETTINGS.h" #include "USER_SETTINGS.h"
#include "src/battery/BATTERIES.h" #include "src/battery/BATTERIES.h"
#include "src/devboard/can/ESP32CAN.h"
#include "src/devboard/config.h" #include "src/devboard/config.h"
#include "src/devboard/modbus/mbServerFCs.h" #include "src/devboard/modbus/mbServerFCs.h"
#include "src/inverter/INVERTERS.h" #include "src/inverter/INVERTERS.h"
#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
#include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h" #include "src/lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h"
#include "src/lib/eModbus-eModbus/Logging.h" #include "src/lib/eModbus-eModbus/Logging.h"
#include "src/lib/eModbus-eModbus/ModbusServerRTU.h" #include "src/lib/eModbus-eModbus/ModbusServerRTU.h"
#include "src/lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "src/lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
//CAN parameters //CAN parameters
CAN_device_t CAN_cfg; // CAN Config CAN_device_t CAN_cfg; // CAN Config

View file

@ -1,6 +1,6 @@
#include "BMW-I3-BATTERY.h" #include "BMW-I3-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
//TODO before using //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) // Map the final values in update_values_i3_battery, set some to static values if not available (current, discharge max , charge max)

View file

@ -2,7 +2,7 @@
#define BMW_I3_BATTERY_H #define BMW_I3_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "CHADEMO-BATTERY.h" #include "CHADEMO-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
/* Do not change code below unless you are sure what you are doing */ /* 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 static unsigned long previousMillis100 = 0; // will store last time a 100ms CAN Message was send

View file

@ -2,7 +2,7 @@
#define CHADEMO_BATTERY_H #define CHADEMO_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "IMIEV-CZERO-ION-BATTERY.h" #include "IMIEV-CZERO-ION-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
//Code still work in progress, TODO: //Code still work in progress, TODO:
//Figure out if CAN messages need to be sent to keep the system happy? //Figure out if CAN messages need to be sent to keep the system happy?

View file

@ -2,7 +2,7 @@
#define IMIEV_CZERO_ION_BATTERY_H #define IMIEV_CZERO_ION_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "KIA-HYUNDAI-64-BATTERY.h" #include "KIA-HYUNDAI-64-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
/* Do not change code below unless you are sure what you are doing */ /* 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 static unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was send

View file

@ -2,7 +2,7 @@
#define KIA_HYUNDAI_64_BATTERY_H #define KIA_HYUNDAI_64_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "NISSAN-LEAF-BATTERY.h" #include "NISSAN-LEAF-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
/* Do not change code below unless you are sure what you are doing */ /* 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 static unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was send

View file

@ -2,7 +2,7 @@
#define NISSAN_LEAF_BATTERY_H #define NISSAN_LEAF_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "RENAULT-ZOE-BATTERY.h" #include "RENAULT-ZOE-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
/* Do not change code below unless you are sure what you are doing */ /* 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 #define LB_MAX_SOC 1000 //BMS never goes over this value. We use this info to rescale SOC% sent to Fronius

View file

@ -2,7 +2,7 @@
#define RENAULT_ZOE_BATTERY_H #define RENAULT_ZOE_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "TESLA-MODEL-3-BATTERY.h" #include "TESLA-MODEL-3-BATTERY.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
/* Do not change code below unless you are sure what you are doing */ /* 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/) */ /* Credits: Most of the code comes from Per Carlen's bms_comms_tesla_model3.py (https://gitlab.com/pelle8/batt2gen24/) */

View file

@ -2,7 +2,7 @@
#define TESLA_MODEL_3_BATTERY_H #define TESLA_MODEL_3_BATTERY_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define ABSOLUTE_MAX_VOLTAGE \ #define ABSOLUTE_MAX_VOLTAGE \
4030 // 403.0V,if battery voltage goes over this, charging is not possible (goes into forced discharge) 4030 // 403.0V,if battery voltage goes over this, charging is not possible (goes into forced discharge)

View file

@ -1,6 +1,6 @@
#include "BYD-CAN.h" #include "BYD-CAN.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
/* Do not change code below unless you are sure what you are doing */ /* 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 static unsigned long previousMillis2s = 0; // will store last time a 2s CAN Message was send

View file

@ -2,7 +2,7 @@
#define BYD_CAN_H #define BYD_CAN_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
extern uint16_t SOC; extern uint16_t SOC;
extern uint16_t StateOfHealth; extern uint16_t StateOfHealth;

View file

@ -1,6 +1,6 @@
#include "PYLON-CAN.h" #include "PYLON-CAN.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#define SEND_0 //If defined, the messages will have ID ending with 0 (useful for some inverters) #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) //#define SEND_1 //If defined, the messages will have ID ending with 1 (useful for some inverters)

View file

@ -2,7 +2,7 @@
#define PYLON_CAN_H #define PYLON_CAN_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
extern uint16_t SOC; extern uint16_t SOC;
extern uint16_t StateOfHealth; extern uint16_t StateOfHealth;

View file

@ -1,6 +1,6 @@
#include "SMA-CAN.h" #include "SMA-CAN.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
//TODO, change CAN sending routine once confirmed that 500ms interval is OK for this battery type //TODO, change CAN sending routine once confirmed that 500ms interval is OK for this battery type

View file

@ -2,7 +2,7 @@
#define SMA_CAN_H #define SMA_CAN_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) extern uint16_t SOC; //SOC%, 0-100.00 (0-10000)
extern uint16_t StateOfHealth; //SOH%, 0-100.00 (0-10000) extern uint16_t StateOfHealth; //SOH%, 0-100.00 (0-10000)

View file

@ -1,6 +1,6 @@
#include "SOFAR-CAN.h" #include "SOFAR-CAN.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.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. */ /* 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. */

View file

@ -2,7 +2,7 @@
#define SOFAR_CAN_H #define SOFAR_CAN_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h" #include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
// These parameters need to be mapped for the inverter // These parameters need to be mapped for the inverter
extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) extern uint16_t SOC; //SOC%, 0-100.00 (0-10000)

View file

@ -2,10 +2,10 @@
#define SOLAX_CAN_H #define SOLAX_CAN_H
#include <Arduino.h> #include <Arduino.h>
#include "../../USER_SETTINGS.h" #include "../../USER_SETTINGS.h"
#include "../devboard/can/ESP32CAN.h"
#include "../devboard/config.h" #include "../devboard/config.h"
#include "../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
#include "../lib/pierremolinaro-acan2515/ACAN2515.h" #include "../lib/pierremolinaro-acan2515/ACAN2515.h"
extern ACAN2515 can; extern ACAN2515 can;
extern uint16_t SOC; extern uint16_t SOC;

View file

@ -1,8 +1,8 @@
#ifndef ESP32CAN_H #ifndef ESP32CAN_H
#define ESP32CAN_H #define ESP32CAN_H
#include "../../lib/ThomasBarth-ESP32-CAN-Driver/CAN.h" #include "../../lib/miwagner-ESP32-Arduino-CAN/CAN.h"
#include "../../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h" #include "../../lib/miwagner-ESP32-Arduino-CAN/CAN_config.h"
extern uint8_t LEDcolor; extern uint8_t LEDcolor;
class ESP32CAN { class ESP32CAN {