mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 18:29:48 +02:00
add devboard folder
This commit is contained in:
parent
8a1d3c1da5
commit
606f49d548
33 changed files with 32 additions and 32 deletions
|
@ -4,11 +4,11 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "HardwareSerial.h"
|
#include "HardwareSerial.h"
|
||||||
#include "USER_SETTINGS.h"
|
#include "USER_SETTINGS.h"
|
||||||
#include "config.h"
|
#include "src/devboard/config.h"
|
||||||
#include "src/lib/eModbus-eModbus/Logging.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 "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/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/battery/BATTERIES.h"
|
#include "src/battery/BATTERIES.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "BMW-I3-BATTERY.h"
|
#include "BMW-I3-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
|
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
|
||||||
|
|
||||||
//TODO before using
|
//TODO before using
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef BMW_I3_BATTERY_H
|
#ifndef BMW_I3_BATTERY_H
|
||||||
#define BMW_I3_BATTERY_H
|
#define BMW_I3_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "CHADEMO-BATTERY.h"
|
#include "CHADEMO-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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 */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CHADEMO_BATTERY_H
|
#ifndef CHADEMO_BATTERY_H
|
||||||
#define CHADEMO_BATTERY_H
|
#define CHADEMO_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "IMIEV-CZERO-ION-BATTERY.h"
|
#include "IMIEV-CZERO-ION-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
|
#include "../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
|
||||||
|
|
||||||
//Code still work in progress, TODO:
|
//Code still work in progress, TODO:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IMIEV_CZERO_ION_BATTERY_H
|
#ifndef IMIEV_CZERO_ION_BATTERY_H
|
||||||
#define IMIEV_CZERO_ION_BATTERY_H
|
#define IMIEV_CZERO_ION_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "KIA-HYUNDAI-64-BATTERY.h"
|
#include "KIA-HYUNDAI-64-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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 */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef KIA_HYUNDAI_64_BATTERY_H
|
#ifndef KIA_HYUNDAI_64_BATTERY_H
|
||||||
#define KIA_HYUNDAI_64_BATTERY_H
|
#define KIA_HYUNDAI_64_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "NISSAN-LEAF-BATTERY.h"
|
#include "NISSAN-LEAF-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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 */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef NISSAN_LEAF_BATTERY_H
|
#ifndef NISSAN_LEAF_BATTERY_H
|
||||||
#define NISSAN_LEAF_BATTERY_H
|
#define NISSAN_LEAF_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "RENAULT-ZOE-BATTERY.h"
|
#include "RENAULT-ZOE-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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 */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef RENAULT_ZOE_BATTERY_H
|
#ifndef RENAULT_ZOE_BATTERY_H
|
||||||
#define RENAULT_ZOE_BATTERY_H
|
#define RENAULT_ZOE_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4040 // 404.4V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "TESLA-MODEL-3-BATTERY.h"
|
#include "TESLA-MODEL-3-BATTERY.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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 */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef TESLA_MODEL_3_BATTERY_H
|
#ifndef TESLA_MODEL_3_BATTERY_H
|
||||||
#define TESLA_MODEL_3_BATTERY_H
|
#define TESLA_MODEL_3_BATTERY_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.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_MAX_VOLTAGE 4030 // 403.0V,if battery voltage goes over this, charging is not possible (goes into forced discharge)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef ESP32CAN_H
|
#ifndef ESP32CAN_H
|
||||||
#define ESP32CAN_H
|
#define ESP32CAN_H
|
||||||
|
|
||||||
#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
|
#include "../../lib/ThomasBarth-ESP32-CAN-Driver/CAN_config.h"
|
||||||
#include "src/lib/ThomasBarth-ESP32-CAN-Driver/CAN.h"
|
#include "../../lib/ThomasBarth-ESP32-CAN-Driver/CAN.h"
|
||||||
extern uint8_t LEDcolor;
|
extern uint8_t LEDcolor;
|
||||||
|
|
||||||
class ESP32CAN
|
class ESP32CAN
|
|
@ -1,5 +1,5 @@
|
||||||
#include "mbServerFCs.h"
|
#include "mbServerFCs.h"
|
||||||
#include "src/lib/eModbus-eModbus/Logging.h"
|
#include "../../lib/eModbus-eModbus/Logging.h"
|
||||||
|
|
||||||
//modbus register memory - declared in main.cpp
|
//modbus register memory - declared in main.cpp
|
||||||
|
|
|
@ -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 MBTCP_ID 21 // modbus TCP server ID
|
||||||
#define MBPV_MAX 30000
|
#define MBPV_MAX 30000
|
|
@ -1,5 +1,5 @@
|
||||||
#include "BYD-CAN.h"
|
#include "BYD-CAN.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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 */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef BYD_CAN_H
|
#ifndef BYD_CAN_H
|
||||||
#define BYD_CAN_H
|
#define BYD_CAN_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.h"
|
#include "../../USER_SETTINGS.h"
|
||||||
|
|
||||||
extern uint16_t SOC;
|
extern uint16_t SOC;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "PYLON-CAN.h"
|
#include "PYLON-CAN.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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_0 //If defined, the messages will have ID ending with 0 (useful for some inverters)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PYLON_CAN_H
|
#ifndef PYLON_CAN_H
|
||||||
#define PYLON_CAN_H
|
#define PYLON_CAN_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.h"
|
#include "../../USER_SETTINGS.h"
|
||||||
|
|
||||||
extern uint16_t SOC;
|
extern uint16_t SOC;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "SMA-CAN.h"
|
#include "SMA-CAN.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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
|
//TODO, change CAN sending routine once confirmed that 500ms interval is OK for this battery type
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef SMA_CAN_H
|
#ifndef SMA_CAN_H
|
||||||
#define SMA_CAN_H
|
#define SMA_CAN_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.h"
|
#include "../../USER_SETTINGS.h"
|
||||||
|
|
||||||
extern uint16_t SOC; //SOC%, 0-100.00 (0-10000)
|
extern uint16_t SOC; //SOC%, 0-100.00 (0-10000)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "SOFAR-CAN.h"
|
#include "SOFAR-CAN.h"
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../lib/ThomasBarth-ESP32-CAN-Driver/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. */
|
/* 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. */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef SOFAR_CAN_H
|
#ifndef SOFAR_CAN_H
|
||||||
#define SOFAR_CAN_H
|
#define SOFAR_CAN_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../USER_SETTINGS.h"
|
#include "../../USER_SETTINGS.h"
|
||||||
|
|
||||||
// These parameters need to be mapped for the inverter
|
// These parameters need to be mapped for the inverter
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#ifndef SOLAX_CAN_H
|
#ifndef SOLAX_CAN_H
|
||||||
#define SOLAX_CAN_H
|
#define SOLAX_CAN_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "../../ESP32CAN.h"
|
#include "../devboard/can/ESP32CAN.h"
|
||||||
#include "../../config.h"
|
#include "../devboard/config.h"
|
||||||
#include "../../USER_SETTINGS.h"
|
#include "../../USER_SETTINGS.h"
|
||||||
|
|
||||||
#include "../../src/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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue