mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
Make LEAF interlock setting configurable
This commit is contained in:
parent
955688fec0
commit
dabbcd8bcd
9 changed files with 32 additions and 16 deletions
|
@ -203,8 +203,9 @@ String settings_processor(const String& var, BatteryEmulatorSettingsStore& setti
|
|||
name_for_comm_interface);
|
||||
}
|
||||
if (var == "BATTCHEM") {
|
||||
return options_for_enum((battery_chemistry_enum)settings.getUInt("BATTCHEM", (int)battery_chemistry_enum::NCA),
|
||||
name_for_chemistry);
|
||||
return options_for_enum(
|
||||
(battery_chemistry_enum)settings.getUInt("BATTCHEM", (int)battery_chemistry_enum::Autodetect),
|
||||
name_for_chemistry);
|
||||
}
|
||||
if (var == "INVTYPE") {
|
||||
return options_for_enum_with_none(
|
||||
|
@ -563,6 +564,10 @@ String settings_processor(const String& var, BatteryEmulatorSettingsStore& setti
|
|||
return String(settings.getUInt("PWMHOLD", 250));
|
||||
}
|
||||
|
||||
if (var == "INTERLOCKREQ") {
|
||||
return settings.getBool("INTERLOCKREQ") ? "checked" : "";
|
||||
}
|
||||
|
||||
if (var == "DIGITALHVIL") {
|
||||
return settings.getBool("DIGITALHVIL") ? "checked" : "";
|
||||
}
|
||||
|
@ -777,6 +782,11 @@ const char* getCANInterfaceName(CAN_Interface interface) {
|
|||
display: contents;
|
||||
}
|
||||
|
||||
form .if-nissan { display: none; }
|
||||
form[data-battery="21"] .if-nissan {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
form .if-tesla { display: none; }
|
||||
form[data-battery="32"] .if-tesla, form[data-battery="33"] .if-tesla {
|
||||
display: contents;
|
||||
|
@ -841,6 +851,11 @@ const char* getCANInterfaceName(CAN_Interface interface) {
|
|||
%BATTTYPE%
|
||||
</select>
|
||||
|
||||
<div class="if-nissan">
|
||||
<label>Interlock required: </label>
|
||||
<input type='checkbox' name='INTERLOCKREQ' value='on' style='margin-left: 0;' %INTERLOCKREQ% />
|
||||
</div>
|
||||
|
||||
<div class="if-tesla">
|
||||
<label>Digital HVIL (2024+): </label>
|
||||
<input type='checkbox' name='DIGITALHVIL' value='on' style='margin-left: 0;' %DIGITALHVIL% />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue