mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Add some required includes
This commit is contained in:
parent
05dc54fe13
commit
f609d54a14
48 changed files with 81 additions and 6 deletions
|
@ -9,6 +9,8 @@
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
|
#include "src/battery/BATTERIES.h"
|
||||||
|
#include "src/charger/CHARGERS.h"
|
||||||
#include "src/communication/Transmitter.h"
|
#include "src/communication/Transmitter.h"
|
||||||
#include "src/communication/can/comm_can.h"
|
#include "src/communication/can/comm_can.h"
|
||||||
#include "src/communication/contactorcontrol/comm_contactorcontrol.h"
|
#include "src/communication/contactorcontrol/comm_contactorcontrol.h"
|
||||||
|
@ -22,10 +24,12 @@
|
||||||
#include "src/devboard/utils/events.h"
|
#include "src/devboard/utils/events.h"
|
||||||
#include "src/devboard/utils/led_handler.h"
|
#include "src/devboard/utils/led_handler.h"
|
||||||
#include "src/devboard/utils/logging.h"
|
#include "src/devboard/utils/logging.h"
|
||||||
|
#include "src/devboard/utils/time_meas.h"
|
||||||
#include "src/devboard/utils/timer.h"
|
#include "src/devboard/utils/timer.h"
|
||||||
#include "src/devboard/utils/value_mapping.h"
|
#include "src/devboard/utils/value_mapping.h"
|
||||||
#include "src/devboard/webserver/webserver.h"
|
#include "src/devboard/webserver/webserver.h"
|
||||||
#include "src/devboard/wifi/wifi.h"
|
#include "src/devboard/wifi/wifi.h"
|
||||||
|
#include "src/inverter/INVERTERS.h"
|
||||||
|
|
||||||
#if !defined(HW_LILYGO) && !defined(HW_STARK) && !defined(HW_3LB) && !defined(HW_DEVKIT)
|
#if !defined(HW_LILYGO) && !defined(HW_STARK) && !defined(HW_3LB) && !defined(HW_DEVKIT)
|
||||||
#error You must select a target hardware in the USER_SETTINGS.h file!
|
#error You must select a target hardware in the USER_SETTINGS.h file!
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "BMW-I3-HTML.h"
|
#include "BMW-I3-HTML.h"
|
||||||
#include "CanBattery.h"
|
#include "CanBattery.h"
|
||||||
|
#include "src/devboard/hal/hal.h"
|
||||||
|
|
||||||
#ifdef BMW_I3_BATTERY
|
#ifdef BMW_I3_BATTERY
|
||||||
#define SELECTED_BATTERY_CLASS BmwI3Battery
|
#define SELECTED_BATTERY_CLASS BmwI3Battery
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Battery {
|
||||||
virtual void update_values() = 0;
|
virtual void update_values() = 0;
|
||||||
|
|
||||||
// The name of the comm interface the battery is using.
|
// The name of the comm interface the battery is using.
|
||||||
virtual String interface_name() = 0;
|
virtual const char* interface_name() = 0;
|
||||||
|
|
||||||
// These are commands from external I/O (UI, MQTT etc.)
|
// These are commands from external I/O (UI, MQTT etc.)
|
||||||
// Override in battery if it supports them. Otherwise they are NOP.
|
// Override in battery if it supports them. Otherwise they are NOP.
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "../datalayer/datalayer_extended.h"
|
#include "../datalayer/datalayer_extended.h"
|
||||||
#include "CHADEMO-BATTERY-HTML.h"
|
#include "CHADEMO-BATTERY-HTML.h"
|
||||||
#include "CanBattery.h"
|
#include "CanBattery.h"
|
||||||
|
#include "src/devboard/hal/hal.h"
|
||||||
|
|
||||||
#ifdef CHADEMO_BATTERY
|
#ifdef CHADEMO_BATTERY
|
||||||
#define SELECTED_BATTERY_CLASS ChademoBattery
|
#define SELECTED_BATTERY_CLASS ChademoBattery
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
#include "CHADEMO-BATTERY.h"
|
#include "CHADEMO-BATTERY.h"
|
||||||
|
#include "src/devboard/utils/logging.h"
|
||||||
|
|
||||||
/* Initial frames received from ISA shunts provide invalid during initialization */
|
/* Initial frames received from ISA shunts provide invalid during initialization */
|
||||||
static int framecount = 0;
|
static int framecount = 0;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "Battery.h"
|
#include "Battery.h"
|
||||||
|
|
||||||
|
#include "USER_SETTINGS.h"
|
||||||
#include "src/communication/Transmitter.h"
|
#include "src/communication/Transmitter.h"
|
||||||
#include "src/communication/can/CanReceiver.h"
|
#include "src/communication/can/CanReceiver.h"
|
||||||
#include "src/communication/can/comm_can.h"
|
#include "src/communication/can/comm_can.h"
|
||||||
|
@ -14,7 +15,7 @@ class CanBattery : public Battery, Transmitter, CanReceiver {
|
||||||
virtual void handle_incoming_can_frame(CAN_frame rx_frame) = 0;
|
virtual void handle_incoming_can_frame(CAN_frame rx_frame) = 0;
|
||||||
virtual void transmit_can(unsigned long currentMillis) = 0;
|
virtual void transmit_can(unsigned long currentMillis) = 0;
|
||||||
|
|
||||||
String interface_name() { return getCANInterfaceName(can_interface); }
|
const char* interface_name() { return getCANInterfaceName(can_interface); }
|
||||||
|
|
||||||
void transmit(unsigned long currentMillis) { transmit_can(currentMillis); }
|
void transmit(unsigned long currentMillis) { transmit_can(currentMillis); }
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "DALY-BMS.h"
|
#include "DALY-BMS.h"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
|
#include "../devboard/hal/hal.h"
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.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 */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "../communication/can/comm_can.h"
|
#include "../communication/can/comm_can.h"
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
|
#include "../devboard/utils/logging.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 previousMillisKeepAlive = 0;
|
static unsigned long previousMillisKeepAlive = 0;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "../communication/can/comm_can.h"
|
#include "../communication/can/comm_can.h"
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
|
#include "../system_settings.h"
|
||||||
|
|
||||||
const unsigned char crc8_table[256] =
|
const unsigned char crc8_table[256] =
|
||||||
{ // CRC8_SAE_J1850_ZER0 formula,0x1D Poly,initial value 0x3F,Final XOR value varies
|
{ // CRC8_SAE_J1850_ZER0 formula,0x1D Poly,initial value 0x3F,Final XOR value varies
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
#include "../devboard/utils/logging.h"
|
#include "../devboard/utils/logging.h"
|
||||||
|
|
||||||
|
#include "../charger/CHARGERS.h"
|
||||||
#include "../charger/CanCharger.h"
|
#include "../charger/CanCharger.h"
|
||||||
|
|
||||||
uint16_t Temp_fromRAW_to_F(uint16_t temperature);
|
uint16_t Temp_fromRAW_to_F(uint16_t temperature);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define ORION_BMS_H
|
#define ORION_BMS_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
#include "../system_settings.h"
|
||||||
#include "CanBattery.h"
|
#include "CanBattery.h"
|
||||||
|
|
||||||
#ifdef ORION_BMS
|
#ifdef ORION_BMS
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define RJXZS_BMS_H
|
#define RJXZS_BMS_H
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
#include "../system_settings.h"
|
||||||
#include "CanBattery.h"
|
#include "CanBattery.h"
|
||||||
|
|
||||||
#ifdef RJXZS_BMS
|
#ifdef RJXZS_BMS
|
||||||
|
|
|
@ -13,7 +13,7 @@ class RS485Battery : public Battery, Transmitter, Rs485Receiver {
|
||||||
public:
|
public:
|
||||||
virtual void transmit_rs485(unsigned long currentMillis) = 0;
|
virtual void transmit_rs485(unsigned long currentMillis) = 0;
|
||||||
|
|
||||||
String interface_name() { return "RS485"; }
|
const char* interface_name() { return "RS485"; }
|
||||||
|
|
||||||
void transmit(unsigned long currentMillis) { transmit_rs485(currentMillis); }
|
void transmit(unsigned long currentMillis) { transmit_rs485(currentMillis); }
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef _SHUNT_H
|
#ifndef _SHUNT_H
|
||||||
#define _SHUNT_H
|
#define _SHUNT_H
|
||||||
|
|
||||||
|
#include "USER_SETTINGS.h"
|
||||||
#include "src/communication/Transmitter.h"
|
#include "src/communication/Transmitter.h"
|
||||||
#include "src/communication/can/CanReceiver.h"
|
#include "src/communication/can/CanReceiver.h"
|
||||||
#include "src/communication/can/comm_can.h"
|
#include "src/communication/can/comm_can.h"
|
||||||
|
@ -16,7 +17,7 @@ class CanShunt : public Transmitter, CanReceiver {
|
||||||
virtual void handle_incoming_can_frame(CAN_frame rx_frame) = 0;
|
virtual void handle_incoming_can_frame(CAN_frame rx_frame) = 0;
|
||||||
|
|
||||||
// The name of the comm interface the shunt is using.
|
// The name of the comm interface the shunt is using.
|
||||||
virtual String interface_name() { return getCANInterfaceName(can_config.shunt); }
|
virtual const char* interface_name() { return getCANInterfaceName(can_config.shunt); }
|
||||||
|
|
||||||
void transmit(unsigned long currentMillis) {
|
void transmit(unsigned long currentMillis) {
|
||||||
if (allowed_to_send_CAN) {
|
if (allowed_to_send_CAN) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "BMW-SBOX.h"
|
||||||
#include "Shunt.h"
|
#include "Shunt.h"
|
||||||
|
|
||||||
CanShunt* shunt = nullptr;
|
CanShunt* shunt = nullptr;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "../datalayer/datalayer_extended.h" //For Advanced Battery Insights webpage
|
#include "../datalayer/datalayer_extended.h" //For Advanced Battery Insights webpage
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
|
#include "../devboard/utils/logging.h"
|
||||||
|
|
||||||
/* Credits: */
|
/* Credits: */
|
||||||
/* Some of the original CAN frame parsing code below comes from Per Carlen's bms_comms_tesla_model3.py (https://gitlab.com/pelle8/batt2gen24/) */
|
/* Some of the original CAN frame parsing code below comes from Per Carlen's bms_comms_tesla_model3.py (https://gitlab.com/pelle8/batt2gen24/) */
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "TEST-FAKE-BATTERY.h"
|
#include "TEST-FAKE-BATTERY.h"
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
|
#include "../devboard/utils/logging.h"
|
||||||
|
|
||||||
static void print_units(const char* header, int value, const char* units) {
|
static void print_units(const char* header, int value, const char* units) {
|
||||||
logging.print(header);
|
logging.print(header);
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#include "CHARGERS.h"
|
||||||
|
#include <vector>
|
||||||
|
#include "CanCharger.h"
|
||||||
|
|
||||||
CanCharger* charger = nullptr;
|
CanCharger* charger = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "src/communication/Transmitter.h"
|
#include "src/communication/Transmitter.h"
|
||||||
#include "src/communication/can/CanReceiver.h"
|
#include "src/communication/can/CanReceiver.h"
|
||||||
|
#include "src/communication/can/comm_can.h"
|
||||||
|
#include "src/devboard/safety/safety.h"
|
||||||
|
|
||||||
enum class ChargerType { None, NissanLeaf, ChevyVolt, Highest };
|
enum class ChargerType { None, NissanLeaf, ChevyVolt, Highest };
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
#include "../../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
|
#include "../../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
|
||||||
#include "../../lib/pierremolinaro-ACAN2517FD/ACAN2517FD.h"
|
#include "../../lib/pierremolinaro-ACAN2517FD/ACAN2517FD.h"
|
||||||
#include "../../lib/pierremolinaro-acan2515/ACAN2515.h"
|
#include "../../lib/pierremolinaro-acan2515/ACAN2515.h"
|
||||||
|
#include "CanReceiver.h"
|
||||||
|
#include "USER_SETTINGS.h"
|
||||||
#include "comm_can.h"
|
#include "comm_can.h"
|
||||||
|
#include "src/datalayer/datalayer.h"
|
||||||
|
#include "src/devboard/safety/safety.h"
|
||||||
#include "src/devboard/sdcard/sdcard.h"
|
#include "src/devboard/sdcard/sdcard.h"
|
||||||
#include "src/devboard/utils/logging.h"
|
#include "src/devboard/utils/logging.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "obd.h"
|
#include "obd.h"
|
||||||
|
#include "../../devboard/utils/logging.h"
|
||||||
#include "comm_can.h"
|
#include "comm_can.h"
|
||||||
|
|
||||||
void show_dtc(uint8_t byte0, uint8_t byte1);
|
void show_dtc(uint8_t byte0, uint8_t byte1);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _OBD_H_
|
#define _OBD_H_
|
||||||
|
|
||||||
#include "../../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
|
#include "../../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
|
||||||
|
#include "comm_can.h"
|
||||||
|
|
||||||
void handle_obd_frame(CAN_frame& rx_frame);
|
void handle_obd_frame(CAN_frame& rx_frame);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#include "comm_contactorcontrol.h"
|
#include "comm_contactorcontrol.h"
|
||||||
|
#include "../../devboard/hal/hal.h"
|
||||||
|
#include "../../devboard/safety/safety.h"
|
||||||
|
#include "../../inverter/INVERTERS.h"
|
||||||
|
|
||||||
#ifdef CONTACTOR_CONTROL
|
#ifdef CONTACTOR_CONTROL
|
||||||
const bool contactor_control_enabled_default = true;
|
const bool contactor_control_enabled_default = true;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#include "comm_equipmentstopbutton.h"
|
#include "comm_equipmentstopbutton.h"
|
||||||
|
#include "../../devboard/hal/hal.h"
|
||||||
|
#include "../../devboard/safety/safety.h"
|
||||||
|
#include "USER_SETTINGS.h"
|
||||||
|
|
||||||
STOP_BUTTON_BEHAVIOR equipment_stop_behavior = stop_button_default_behavior;
|
STOP_BUTTON_BEHAVIOR equipment_stop_behavior = stop_button_default_behavior;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#include "comm_nvm.h"
|
#include "comm_nvm.h"
|
||||||
|
#include "../../battery/Battery.h"
|
||||||
|
#include "../../battery/Shunt.h"
|
||||||
|
#include "../../charger/CanCharger.h"
|
||||||
#include "../../communication/can/comm_can.h"
|
#include "../../communication/can/comm_can.h"
|
||||||
#include "../../devboard/mqtt/mqtt.h"
|
#include "../../devboard/mqtt/mqtt.h"
|
||||||
#include "../../devboard/wifi/wifi.h"
|
#include "../../devboard/wifi/wifi.h"
|
||||||
|
#include "../../inverter/INVERTERS.h"
|
||||||
#include "../contactorcontrol/comm_contactorcontrol.h"
|
#include "../contactorcontrol/comm_contactorcontrol.h"
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef _COMM_NVM_H_
|
#ifndef _COMM_NVM_H_
|
||||||
#define _COMM_NVM_H_
|
#define _COMM_NVM_H_
|
||||||
|
|
||||||
|
#include <Preferences.h>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
#include "../../devboard/utils/events.h"
|
#include "../../devboard/utils/events.h"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "precharge_control.h"
|
#include "precharge_control.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
#include "../../datalayer/datalayer_extended.h"
|
#include "../../datalayer/datalayer_extended.h"
|
||||||
|
#include "../../devboard/hal/hal.h"
|
||||||
|
|
||||||
#ifdef PRECHARGE_CONTROL
|
#ifdef PRECHARGE_CONTROL
|
||||||
const bool precharge_control_enabled_default = true;
|
const bool precharge_control_enabled_default = true;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "comm_rs485.h"
|
#include "comm_rs485.h"
|
||||||
|
#include "../../devboard/hal/hal.h"
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
bool init_rs485() {
|
bool init_rs485() {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "../../lib/bblanchon-ArduinoJson/ArduinoJson.h"
|
#include "../../lib/bblanchon-ArduinoJson/ArduinoJson.h"
|
||||||
#include "../utils/events.h"
|
#include "../utils/events.h"
|
||||||
#include "../utils/timer.h"
|
#include "../utils/timer.h"
|
||||||
|
#include "mqtt.h"
|
||||||
#include "mqtt_client.h"
|
#include "mqtt_client.h"
|
||||||
|
|
||||||
#ifdef MQTT
|
#ifdef MQTT
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#define __MQTT_H__
|
#define __MQTT_H__
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define MQTT_MSG_BUFFER_SIZE (1024)
|
#define MQTT_MSG_BUFFER_SIZE (1024)
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#include "safety.h"
|
#include "safety.h"
|
||||||
|
#include "../../battery/BATTERIES.h"
|
||||||
|
#include "../../charger/CHARGERS.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
|
#include "../../inverter/INVERTERS.h"
|
||||||
#include "../utils/events.h"
|
#include "../utils/events.h"
|
||||||
|
|
||||||
static uint16_t cell_deviation_mV = 0;
|
static uint16_t cell_deviation_mV = 0;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
|
||||||
|
|
||||||
#include "../../../USER_SETTINGS.h"
|
#include "../../../USER_SETTINGS.h"
|
||||||
|
#include "../../datalayer/datalayer.h"
|
||||||
|
#include "../../devboard/hal/hal.h"
|
||||||
|
#include "../../devboard/utils/logging.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EVENTS_STRUCT_TYPE entries[EVENT_NOF_EVENTS];
|
EVENTS_STRUCT_TYPE entries[EVENT_NOF_EVENTS];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "led_handler.h"
|
#include "led_handler.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
|
#include "../../devboard/hal/hal.h"
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
#include "value_mapping.h"
|
#include "value_mapping.h"
|
||||||
|
|
||||||
|
@ -27,9 +28,11 @@ bool led_init(void) {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_exe(void) {
|
void led_exe(void) {
|
||||||
led->exe();
|
led->exe();
|
||||||
}
|
}
|
||||||
|
|
||||||
led_color led_get_color() {
|
led_color led_get_color() {
|
||||||
return led->color;
|
return led->color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef LED_H_
|
#ifndef LED_H_
|
||||||
#define LED_H_
|
#define LED_H_
|
||||||
|
|
||||||
|
#include "../../devboard/utils/types.h"
|
||||||
#include "../../lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h"
|
#include "../../lib/adafruit-Adafruit_NeoPixel/Adafruit_NeoPixel.h"
|
||||||
|
|
||||||
class LED {
|
class LED {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#include "ntp_time.h"
|
#include "ntp_time.h"
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include "../../devboard/utils/logging.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
|
|
||||||
const unsigned long millisInADay = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
|
const unsigned long millisInADay = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef TIME_MEAS_H_
|
#ifndef TIME_MEAS_H_
|
||||||
#define TIME_MEAS_H_
|
#define TIME_MEAS_H_
|
||||||
|
|
||||||
|
#include "USER_SETTINGS.h"
|
||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
|
|
||||||
/** Start time measurement in microseconds
|
/** Start time measurement in microseconds
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "advanced_battery_html.h"
|
#include "advanced_battery_html.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "../../battery/BATTERIES.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
#include "../../datalayer/datalayer_extended.h"
|
#include "../../datalayer/datalayer_extended.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "cellmonitor_html.h"
|
#include "cellmonitor_html.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
#include "../../battery/BATTERIES.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
|
|
||||||
String cellmonitor_processor(const String& var) {
|
String cellmonitor_processor(const String& var) {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef CELLMONITOR_H
|
#ifndef CELLMONITOR_H
|
||||||
#define CELLMONITOR_H
|
#define CELLMONITOR_H
|
||||||
|
|
||||||
|
#include <WString.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Replaces placeholder with content section in web page
|
* @brief Replaces placeholder with content section in web page
|
||||||
*
|
*
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include "../../communication/nvm/comm_nvm.h"
|
#include "../../communication/nvm/comm_nvm.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
#include "index_html.h"
|
#include "index_html.h"
|
||||||
|
#include "src/battery/BATTERIES.h"
|
||||||
|
#include "src/inverter/INVERTERS.h"
|
||||||
|
|
||||||
extern bool settingsUpdated;
|
extern bool settingsUpdated;
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,13 @@
|
||||||
#include "../../../USER_SECRETS.h"
|
#include "../../../USER_SECRETS.h"
|
||||||
#include "../../battery/BATTERIES.h"
|
#include "../../battery/BATTERIES.h"
|
||||||
#include "../../battery/Battery.h"
|
#include "../../battery/Battery.h"
|
||||||
|
#include "../../charger/CHARGERS.h"
|
||||||
#include "../../communication/can/comm_can.h"
|
#include "../../communication/can/comm_can.h"
|
||||||
#include "../../communication/contactorcontrol/comm_contactorcontrol.h"
|
#include "../../communication/contactorcontrol/comm_contactorcontrol.h"
|
||||||
#include "../../communication/nvm/comm_nvm.h"
|
#include "../../communication/nvm/comm_nvm.h"
|
||||||
#include "../../datalayer/datalayer.h"
|
#include "../../datalayer/datalayer.h"
|
||||||
#include "../../datalayer/datalayer_extended.h"
|
#include "../../datalayer/datalayer_extended.h"
|
||||||
|
#include "../../inverter/INVERTERS.h"
|
||||||
#include "../../lib/bblanchon-ArduinoJson/ArduinoJson.h"
|
#include "../../lib/bblanchon-ArduinoJson/ArduinoJson.h"
|
||||||
#include "../sdcard/sdcard.h"
|
#include "../sdcard/sdcard.h"
|
||||||
#include "../utils/events.h"
|
#include "../utils/events.h"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "wifi.h"
|
#include "wifi.h"
|
||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
#include "../utils/events.h"
|
#include "../utils/events.h"
|
||||||
|
#include "../utils/logging.h"
|
||||||
|
|
||||||
#if defined(WIFI) || defined(WEBSERVER)
|
#if defined(WIFI) || defined(WEBSERVER)
|
||||||
const bool wifi_enabled_default = true;
|
const bool wifi_enabled_default = true;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#define SELECTED_INVERTER_CLASS BydCanInverter
|
#define SELECTED_INVERTER_CLASS BydCanInverter
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "../../USER_SETTINGS.h"
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
class BydCanInverter : public CanInverterProtocol {
|
class BydCanInverter : public CanInverterProtocol {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "BYD-MODBUS.h"
|
#include "BYD-MODBUS.h"
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
|
#include "../devboard/hal/hal.h"
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
#include "../lib/eModbus-eModbus/scripts/mbServerFCs.h"
|
#include "../lib/eModbus-eModbus/scripts/mbServerFCs.h"
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
#define CANINVERTER_PROTOCOL_H
|
#define CANINVERTER_PROTOCOL_H
|
||||||
|
|
||||||
#include "InverterProtocol.h"
|
#include "InverterProtocol.h"
|
||||||
|
#include "USER_SETTINGS.h"
|
||||||
|
|
||||||
|
#include "src/communication/Transmitter.h"
|
||||||
#include "src/communication/can/CanReceiver.h"
|
#include "src/communication/can/CanReceiver.h"
|
||||||
#include "src/communication/can/comm_can.h"
|
#include "src/communication/can/comm_can.h"
|
||||||
|
#include "src/devboard/safety/safety.h"
|
||||||
#include "src/devboard/utils/types.h"
|
#include "src/devboard/utils/types.h"
|
||||||
|
|
||||||
class CanInverterProtocol : public InverterProtocol, Transmitter, CanReceiver {
|
class CanInverterProtocol : public InverterProtocol, Transmitter, CanReceiver {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "INVERTERS.h"
|
||||||
|
|
||||||
InverterProtocol* inverter = nullptr;
|
InverterProtocol* inverter = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef INVERTER_PROTOCOL_H
|
#ifndef INVERTER_PROTOCOL_H
|
||||||
#define INVERTER_PROTOCOL_H
|
#define INVERTER_PROTOCOL_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
enum class InverterProtocolType {
|
enum class InverterProtocolType {
|
||||||
None = 0,
|
None = 0,
|
||||||
AforeCan,
|
AforeCan,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "KOSTAL-RS485.h"
|
#include "KOSTAL-RS485.h"
|
||||||
|
#include "../battery/BATTERIES.h"
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
|
#include "../devboard/hal/hal.h"
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
|
|
||||||
void KostalInverterProtocol::float2frame(byte* arr, float value, byte framepointer) {
|
void KostalInverterProtocol::float2frame(byte* arr, float value, byte framepointer) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue