mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Add user configurable BMS reset off time
This commit is contained in:
parent
3612e18452
commit
bdaa198886
5 changed files with 27 additions and 3 deletions
|
@ -401,6 +401,10 @@ String settings_processor(const String& var, BatteryEmulatorSettingsStore& setti
|
|||
return String(datalayer.battery.settings.balancing_max_deviation_cell_voltage_mV / 1.0, 0);
|
||||
}
|
||||
|
||||
if (var == "BMS_RESET_DURATION") {
|
||||
return String(datalayer.battery.settings.user_set_bms_reset_duration_ms / 1000.0, 0);
|
||||
}
|
||||
|
||||
if (var == "CHARGER_CLASS") {
|
||||
if (!charger) {
|
||||
return "hidden";
|
||||
|
@ -543,6 +547,9 @@ const char* getCANInterfaceName(CAN_Interface interface) {
|
|||
xhr=new
|
||||
XMLHttpRequest();xhr.onload=editComplete;xhr.onerror=editError;xhr.open('GET','/updateMaxDischargeVoltage?value='+value,true);xhr.send();}else{alert('Invalid value. Please enter a value between 0 and 1000.0');}}}
|
||||
|
||||
function editBMSresetDuration(){var value=prompt('Amount of seconds BMS power should be off during periodic daily resets. Requires "Periodic BMS reset" to be enabled. Enter value in seconds (1-59):');if(value!==null){if(value>=1&&value<=59){var
|
||||
xhr=new XMLHttpRequest();xhr.onload=editComplete;xhr.onerror=editError;xhr.open('GET','/updateBMSresetDuration?value='+value,true);xhr.send();}else{alert('Invalid value. Please enter a value between 1 and 59');}}}
|
||||
|
||||
function editTeslaBalAct(){var value=prompt('Enable or disable forced LFP balancing. Makes the battery charge to 101percent. This should be performed once every month, to keep LFP batteries balanced. Ensure battery is fully charged before enabling, and also that you have enough sun or grid power to feed power into the battery while balancing is active. Enter 1 for enabled, 0 for disabled');if(value!==null){if(value==0||value==1){var xhr=new
|
||||
XMLHttpRequest();xhr.onload=editComplete;xhr.onerror=editError;xhr.open('GET','/TeslaBalAct?value='+value,true);xhr.send();}}else{alert('Invalid value. Please enter 1 or 0');}}
|
||||
|
||||
|
@ -791,6 +798,8 @@ const char* getCANInterfaceName(CAN_Interface interface) {
|
|||
|
||||
<h4 class='%VOLTAGE_LIMITS_ACTIVE_CLASS%'>Target discharge voltage: %DISCHARGE_VOLTAGE% V </span> <button onclick='editMaxDischargeVoltage()'>Edit</button></h4>
|
||||
|
||||
<h4 style='color: white;'>Periodic BMS reset off time: %BMS_RESET_DURATION% s </span><button onclick='editBMSresetDuration()'>Edit</button></h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div style='background-color: #2E37AD; padding: 10px; margin-bottom: 10px;border-radius: 50px' class="%FAKE_VOLTAGE_CLASS%">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue