Skip to content

Commit

Permalink
Trigger BMS error rule on comms error
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartpittaway committed Mar 15, 2021
1 parent 593a81c commit 346e570
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ESPController/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ void ProcessRules()
if (receiveProc.HasCommsTimedOut())
{
rules.SetError(InternalErrorCode::CommunicationsError);
rules.rule_outcome[Rule::BMSError] = true;
}

uint8_t cellid = 0;
Expand Down Expand Up @@ -454,6 +455,7 @@ void ProcessRules()
if (ControlState == ControllerState::Running && rules.zeroVoltageModuleCount > 0)
{
rules.SetError(InternalErrorCode::ZeroVoltModule);
rules.rule_outcome[Rule::BMSError] = true;
}

rules.RunRules(
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Download the ZIP file named "Compiled_Firmware_YYYY-MM-DD-HH-MM.zip" and *extrac
* module_fw_V420_SWAPR19R20_attiny841_420_SWAPR19R20_eF4_hD6_l62.hex
* module_fw_V421_attiny841_421_eF4_hD6_l62.hex
* module_fw_V421_LTO_attiny841_421_eF4_hD6_l62.hex
* module_fw_V440_attiny841_440_eF4_hD6_l6C.hex

You can ignore the "filesystemimage" for the esp8266, this is no longer required.

Expand Down Expand Up @@ -210,11 +211,10 @@ https://github.com/stuartpittaway/diyBMSv4

* V421 = JLCPCB built board (marked DIYBMS v4.21 on silkscreen) - has 20 small resistors (marked 6R20) and machine soldered using 0603 sized parts (R19 is in middle of resistor array)

* V430 = JLCPCB built board (marked DIYBMS v4.3 on silkscreen) - not released to public - experimental version - DO NOT USE THIS WITH A LOWER VERSION BOARD!!
* V440 = Marked DIYBMS v4.4 on silkscreen, released Feb 2021 - DO NOT USE THIS CODE WITH OLDER VERSION BOARDS

Open the module code, navigate to platformio environment "env:attiny841_VXXX", (where XXX is the version from above). Connect your USBASP programmer to the module and select "Upload"


# WARNING

This is a DIY product/solution so don’t use this for safety critical systems or in any situation where there could be a risk to life.
Expand Down

0 comments on commit 346e570

Please sign in to comment.