Giter Site home page Giter Site logo

mcu-primary's Introduction

The foxBMS Project

foxBMS

foxBMS is a free, open and flexible development environment to design battery management systems. It is the first modular open source BMS development platform.

foxBMS 2

foxBMS 1

⚠️ Refer to foxBMS 2 as foxBMS 1 is no longer supported or updated ⚠️

Contact

For more information or if you want to give use some feedback, please contact us.

The Fraunhofer IISB foxBMS Team

foxbms.org

mcu-primary's People

Contributors

foxbms avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mcu-primary's Issues

array boundaries of DATA_BLOCK_CELLTEMPERATURE_s.temperature[] are violated

Affected files

cansignal_cfg.c

Description

If a system is not equipped with all available temperature sensors this violation will cause wrong temperatures to be displayed via CAN.

For Example

In a System equipped with one temperature sensor and one slave module the array in the database block DATA_BLOCK_CELLTEMPERATURE_s has one element.
In the cans_gettemp(uint32_t sigIdx, void *value) the datablock is read. If the first CAN Message is send this function will be called and the temperatures for the first three sensors are read: tmpVal = temp_tab.temperature[(modIdx * BS_NR_OF_TEMP_SENSORS_PER_MODULE) + cellIdx];
since the array has only one element the values read for the second and third temperature value are not temperatures, but the next entries in the struct DATA_BLOCK_CELLTEMPERATURE_s
this leads to a cell temperature for module 0 cell two showing the previous_timestamp

Possible Solution

I suggest adding a line of code to check the array boundaries. To prevent confusion fill the unused temperatures with a default value.

The same problem exists with the valid flags for the temperatures since the array size will change with the number of modules.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.