Skip to content

Commit

Permalink
On/Off Checkbox bei Entladestrom-Zellspanung
Browse files Browse the repository at this point in the history
  • Loading branch information
shining-man committed Apr 10, 2024
1 parent cddc4c2 commit 433c494
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
7 changes: 4 additions & 3 deletions include/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,11 @@ enum serialDataRwTyp_e {BPN_NO_DATA, BPN_READ_SETTINGS, BPN_WRITE_READ_SETTINGS,
#define ID_PARAM_INVERTER_AUTOBALANCE_CHARGE_CELLVOLTAGE 154

#define ID_PARAM_INVERTER_LADESTROM_REDUZIEREN_SOC_MINDEST_STROM 155
#define ID_PARAM_BMS_FLOAT_CHARGE_SPG 156
#define ID_PARAM_BMS_FLOAT_CHARGE_SPG 156

#define ID_PARAM_INVERTER_AUTOBALANCE_ENABLE 157
#define ID_PARAM_INVERTER_CHARGE_CURRENT_CUT_OFF_ENABLE 158
#define ID_PARAM_INVERTER_AUTOBALANCE_ENABLE 157
#define ID_PARAM_INVERTER_CHARGE_CURRENT_CUT_OFF_ENABLE 158
#define ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_EN 159



Expand Down
2 changes: 1 addition & 1 deletion include/params.h

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions include/params_dt.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
#define DT_ID_PARAM_INVERTER_LADESTROM_REDUZIEREN_AB_SOC PARAM_DT_U8
#define DT_ID_PARAM_INVERTER_LADESTROM_REDUZIEREN_A_PRO_PERCENT_SOC PARAM_DT_U16
#define DT_ID_PARAM_INVERTER_LADESTROM_REDUZIEREN_SOC_MINDEST_STROM PARAM_DT_U8
#define DT_ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_EN PARAM_DT_BO
#define DT_ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_STARTSPG PARAM_DT_U16
#define DT_ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_ENDSPG PARAM_DT_U16
#define DT_ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_MINDEST_STROM PARAM_DT_U8
Expand Down
9 changes: 8 additions & 1 deletion include/params_py.h
Original file line number Diff line number Diff line change
Expand Up @@ -1445,10 +1445,17 @@ const String paramBmsToInverter PROGMEM = "{'page':["
"'label':'Entladestrom Zell-Spannungsabhängig drosseln',"
"'type':"+String(HTML_SEPARATION)+""
"},"
"{"
"'name':"+String(ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_EN)+","
"'label':'Ein/Aus',"
"'type':"+String(HTML_INPUTCHECKBOX)+","
"'default':'0',"
"'dt':"+String(PARAM_DT_BO)+""
"},"
"{"
"'name':"+String(ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_STARTSPG)+","
"'label':'Starten bei Zellspg. kleiner',"
"'help':'Sobald die niedrigste Zellspannung diesen Wert unterschreitet wird die Drosselung aktiv.\nMit 0 ist die Funtkion deaktiviert',"
"'help':'Sobald die niedrigste Zellspannung diesen Wert unterschreitet wird die Drosselung aktiv.',"
"'unit':'mV',"
"'type':"+String(HTML_INPUTNUMBER)+","
"'default':'0',"
Expand Down
6 changes: 3 additions & 3 deletions src/inverter/DisChargeCurrentCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ namespace nsDisChargeCurrentCtrl
*******************************************************************************************************/
int16_t DisChargeCurrentCtrl::calcEntladestromZellspanung(Inverter::inverterData_s &inverterData, int16_t i16_pMaxDischargeCurrent)
{
uint16_t u16_lStartSpg = WebSettings::getInt(ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_STARTSPG,0,DT_ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_STARTSPG);

if(u16_lStartSpg>0) //wenn enabled
if(WebSettings::getBool(ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_EN, 0))
{
uint16_t u16_lStartSpg = WebSettings::getInt(ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_STARTSPG,0,DT_ID_PARAM_INVERTER_ENTLADESTROM_REDUZIEREN_ZELLSPG_STARTSPG);

//Kleinste Zellspannung von den aktiven BMSen ermitteln
uint16_t u16_lAktuelleMinZellspg = BmsDataUtils::getMinCellSpannungFromBms(inverterData.u8_bmsDatasource, inverterData.u16_bmsDatasourceAdd);

Expand Down

0 comments on commit 433c494

Please sign in to comment.