mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 01:39:30 +02:00
Remove more USER_SETTINGS
This commit is contained in:
parent
bb21b5d8e1
commit
da560e1629
16 changed files with 21 additions and 26 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "src/devboard/utils/logging.h"
|
||||
#include "src/devboard/utils/time_meas.h"
|
||||
#include "src/devboard/utils/timer.h"
|
||||
#include "src/devboard/utils/types.h"
|
||||
#include "src/devboard/utils/value_mapping.h"
|
||||
#include "src/devboard/webserver/webserver.h"
|
||||
#include "src/devboard/wifi/wifi.h"
|
||||
|
|
|
@ -6,11 +6,3 @@
|
|||
IPAddress local_IP(192, 168, 10, 150);
|
||||
IPAddress gateway(192, 168, 10, 1);
|
||||
IPAddress subnet(255, 255, 255, 0);
|
||||
|
||||
/* Charger settings (Optional, when using generator charging) */
|
||||
volatile float CHARGER_SET_HV = 384; // Reasonably appropriate 4.0v per cell charging of a 96s pack
|
||||
volatile float CHARGER_MAX_HV = 420; // Max permissible output (VDC) of charger
|
||||
volatile float CHARGER_MIN_HV = 200; // Min permissible output (VDC) of charger
|
||||
volatile float CHARGER_MAX_POWER = 3300; // Max power capable of charger, as a ceiling for validating config
|
||||
volatile float CHARGER_MAX_A = 11.5; // Max current output (amps) of charger
|
||||
volatile float CHARGER_END_A = 1.0; // Current at which charging is considered complete
|
||||
|
|
|
@ -10,13 +10,6 @@
|
|||
/* Connectivity options */
|
||||
//#define WIFICONFIG //Enable this line to set a static IP address / gateway /subnet mask for the device. see USER_SETTINGS.cpp for the settings
|
||||
|
||||
extern volatile float CHARGER_SET_HV;
|
||||
extern volatile float CHARGER_MAX_HV;
|
||||
extern volatile float CHARGER_MIN_HV;
|
||||
extern volatile float CHARGER_MAX_POWER;
|
||||
extern volatile float CHARGER_MAX_A;
|
||||
extern volatile float CHARGER_END_A;
|
||||
|
||||
#ifdef WIFICONFIG
|
||||
extern IPAddress local_IP;
|
||||
extern IPAddress gateway;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef BATTERIES_H
|
||||
#define BATTERIES_H
|
||||
#include "../../USER_SETTINGS.h"
|
||||
#include "Shunt.h"
|
||||
|
||||
class Battery;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "Battery.h"
|
||||
|
||||
#include "../../USER_SETTINGS.h"
|
||||
#include "../../src/communication/Transmitter.h"
|
||||
#include "../../src/communication/can/CanReceiver.h"
|
||||
#include "../../src/communication/can/comm_can.h"
|
||||
|
|
|
@ -15,8 +15,6 @@ changing.
|
|||
|
||||
OPTIONAL SETTINGS
|
||||
|
||||
Put these in your USER_SETTINGS.h:
|
||||
|
||||
// This will scale the SoC so the batteries top out at 4.2V/cell instead of
|
||||
4.1V/cell. The car only seems to use up to 4.1V/cell in service.
|
||||
#define MG_HS_PHEV_USE_FULL_CAPACITY true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _SHUNT_H
|
||||
#define _SHUNT_H
|
||||
|
||||
#include "../../USER_SETTINGS.h"
|
||||
#include "../../src/communication/Transmitter.h"
|
||||
#include "../../src/communication/can/CanReceiver.h"
|
||||
#include "../../src/communication/can/comm_can.h"
|
||||
|
|
|
@ -6,6 +6,15 @@ CanCharger* charger = nullptr;
|
|||
|
||||
ChargerType user_selected_charger_type = ChargerType::None;
|
||||
|
||||
/* Charger settings (Optional, when using generator charging) */
|
||||
//TODO: These should be user configurable via webserver
|
||||
volatile float CHARGER_SET_HV = 384; // Reasonably appropriate 4.0v per cell charging of a 96s pack
|
||||
volatile float CHARGER_MAX_HV = 420; // Max permissible output (VDC) of charger
|
||||
volatile float CHARGER_MIN_HV = 200; // Min permissible output (VDC) of charger
|
||||
volatile float CHARGER_MAX_POWER = 3300; // Max power capable of charger, as a ceiling for validating config
|
||||
volatile float CHARGER_MAX_A = 11.5; // Max current output (amps) of charger
|
||||
volatile float CHARGER_END_A = 1.0; // Current at which charging is considered complete
|
||||
|
||||
std::vector<ChargerType> supported_charger_types() {
|
||||
std::vector<ChargerType> types;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef CHARGERS_H
|
||||
#define CHARGERS_H
|
||||
#include "../../USER_SETTINGS.h"
|
||||
|
||||
#include "CHEVY-VOLT-CHARGER.h"
|
||||
#include "NISSAN-LEAF-CHARGER.h"
|
||||
|
@ -12,4 +11,12 @@ void setup_charger();
|
|||
// The selected charger or null if no charger in use.
|
||||
extern CanCharger* charger;
|
||||
|
||||
//TODO: These should be user configurable via webserver
|
||||
extern volatile float CHARGER_SET_HV;
|
||||
extern volatile float CHARGER_MAX_HV;
|
||||
extern volatile float CHARGER_MIN_HV;
|
||||
extern volatile float CHARGER_MAX_POWER;
|
||||
extern volatile float CHARGER_MAX_A;
|
||||
extern volatile float CHARGER_END_A;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "../communication/can/comm_can.h"
|
||||
#include "../datalayer/datalayer.h"
|
||||
#include "../devboard/utils/logging.h"
|
||||
#include "CHARGERS.h"
|
||||
|
||||
/* This implements Chevy Volt / Ampera charger support (2011-2015 model years).
|
||||
*
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "NISSAN-LEAF-CHARGER.h"
|
||||
#include "../communication/can/comm_can.h"
|
||||
#include "../datalayer/datalayer.h"
|
||||
#include "CHARGERS.h"
|
||||
|
||||
/* This implements Nissan LEAF PDM charger support. 2013-2024 Gen2/3 PDMs are supported
|
||||
*
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "../../lib/pierremolinaro-acan-esp32/ACAN_ESP32.h"
|
||||
#include "../../lib/pierremolinaro-acan2515/ACAN2515.h"
|
||||
#include "CanReceiver.h"
|
||||
#include "USER_SETTINGS.h"
|
||||
#include "comm_can.h"
|
||||
#include "src/datalayer/datalayer.h"
|
||||
#include "src/devboard/safety/safety.h"
|
||||
|
|
|
@ -257,7 +257,7 @@ REMOTE_BMS_RESET - Allows the user to remotely powercycle the BMS by sending a c
|
|||
|
||||
This makes the BMS recalculate all SOC% and avoid memory leaks
|
||||
During that time we also set the emulator state to paused in order to not try and send CAN messages towards the battery
|
||||
Feature is only used if user has enabled PERIODIC_BMS_RESET in the USER_SETTINGS */
|
||||
Feature is only used if user has enabled PERIODIC_BMS_RESET */
|
||||
|
||||
void handle_BMSpower() {
|
||||
if (periodic_bms_reset || remote_bms_reset) {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include "../../devboard/hal/hal.h"
|
||||
#include "../../devboard/safety/safety.h"
|
||||
#include "../../devboard/utils/debounce_button.h"
|
||||
#include "USER_SETTINGS.h"
|
||||
|
||||
const STOP_BUTTON_BEHAVIOR stop_button_default_behavior = STOP_BUTTON_BEHAVIOR::NOT_CONNECTED;
|
||||
STOP_BUTTON_BEHAVIOR equipment_stop_behavior = stop_button_default_behavior;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _DATALAYER_H_
|
||||
#define _DATALAYER_H_
|
||||
|
||||
#include "../../USER_SETTINGS.h"
|
||||
#include "../devboard/utils/types.h"
|
||||
#include "../system_settings.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define _DATALAYER_EXTENDED_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../../USER_SETTINGS.h"
|
||||
|
||||
struct DATALAYER_INFO_BOLTAMPERA {
|
||||
/** uint16_t */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue