mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 18:29:48 +02:00
Merge pull request #1040 from dalathegreat/feature/negative-SOC-scaling
Feature: Add negative SOC scaling 📉
This commit is contained in:
commit
15fce9073b
3 changed files with 11 additions and 4 deletions
|
@ -113,7 +113,7 @@ typedef struct {
|
|||
/** Minimum percentage setting. Set this value to the lowest real SOC
|
||||
* you want the inverter to be able to use. At this real SOC, the inverter
|
||||
* will "see" 0% */
|
||||
uint16_t min_percentage = BATTERY_MINPERCENTAGE;
|
||||
int16_t min_percentage = BATTERY_MINPERCENTAGE;
|
||||
/** Maximum percentage setting. Set this value to the highest real SOC
|
||||
* you want the inverter to be able to use. At this real SOC, the inverter
|
||||
* will "see" 100% */
|
||||
|
|
|
@ -209,10 +209,11 @@ String settings_processor(const String& var) {
|
|||
"100.0');}}}";
|
||||
content +=
|
||||
"function editSocMin(){var value=prompt('Inverter will see completely discharged (0pct)SOC when this value is "
|
||||
"reached. Enter new minimum SOC value that battery will discharge to "
|
||||
"(0-50.0):');if(value!==null){if(value>=0&&value<=50){var xhr=new "
|
||||
"reached. Advanced users can set to negative values. Enter new minimum SOC value that battery will discharge "
|
||||
"to "
|
||||
"(-10.0to50.0):');if(value!==null){if(value>=-10&&value<=50){var xhr=new "
|
||||
"XMLHttpRequest();xhr.onload=editComplete;xhr.onerror=editError;xhr.open('GET','/"
|
||||
"updateSocMin?value='+value,true);xhr.send();}else{alert('Invalid value. Please enter a value between 0 and "
|
||||
"updateSocMin?value='+value,true);xhr.send();}else{alert('Invalid value. Please enter a value between -10 and "
|
||||
"50.0');}}}";
|
||||
content +=
|
||||
"function editMaxChargeA(){var value=prompt('Some inverters needs to be artificially limited. Enter new "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue